Scotsguy / now-playing

Minecraft mod that shows a 'now playing' popup whenever music changes.
MIT License
10 stars 4 forks source link

Custom Music Not Showing Properly #5

Closed LagoRoxo closed 2 years ago

LagoRoxo commented 4 years ago

unknown Playing custom music added by resource packs appears as in the image(either toast or hotbar)

image

Here's a resource pack to test it by yourself: to_github.zip (the zip contains a readme with a step-by-step tutorial to reproduce the bug)

game version: 1.16.2 mod version: v1.1.4-forge

JayJay1989 commented 4 years ago

I will look into it

Scotsguy commented 4 years ago

This is a problem that isn't fixable easily - sounds.json doesn't include a human-readable name, so what should this display? Probably nothing, to be fair. This is, however, manually fixable (in theory): create a file in assets/now_playing/lang/en_us.json and add a language file entry for "now_playing.sound.music/game/nether/soulsand_valley/testing" with whatever you want your song to be called. Basically, do it like this: https://github.com/Scotsguy/now-playing/blob/master/src/main/resources/assets/now_playing/lang/en_us.json

Scotsguy commented 4 years ago

image Sure enough, this works. Example zip: now_playing_custom_music.zip Still gotta make a bit of a nicer error message, though

LagoRoxo commented 4 years ago

my suggestion is to add a config file where the user could do this easily. maybe like a JSON table like this: [{ "path" : "", "author": "", "name":"" }] and then make a script to add it, but I don't know how flexible Fabric or Forge is but thank you.

Scotsguy commented 2 years ago

Closing to clean up the issue tracker, songs that don't have names won't be displayed at all anymore.