mojira.dev
MC-133548

Game ignores lang.json files in resource packs unless the very last definition is present

I was trying to make a pack that replaces the music discs with other music and rename the discs using lang files, and I did so in 1.12.2 just fine. However, in 1.13 the game uses a .json file instead of a .lang file, and it apparently ignores everything unless the very last line is present: "realms.missing.snapshot.error.text".

 

If that line is not included within the lang.json file, then according to my testing it ignores the file.

 

Here is how I recommend lang in resource packs; No matter what language the game is in, the texture pack’s lang.json overrides that language’s lang.json.

Attachments

Comments 4

Can you attach the language file that didn't work?

Works fine for me, make sure the final string has no comma at the end, and that it's valid json in general.
(try using https://jsonlint.com/ to validate your json.)

Yep, that one has a trailing comma at the end ("item.minecraft.music_disc_wait.desc": "song12",) and as such is invalid. Copying realms.missing.snapshot.error.text from the original one would have fixed that since it doesn't have the trailing comma, but just getting rid of the trailing comma would fix it too.

I'd expect the game to log a warning about malformed JSON in that case; I'm not 100% sure if it does though.

Well, thats embarrassing. I was just trying to go into this with 0 java/json knowledge and managed to make it work for .lang files. One comma was my only error. :/ thanks for the help.

Gamepro5

(Unassigned)

Unconfirmed

Minecraft 1.13-pre8

Retrieved