Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-160843

Languages from Resourcepacks do not always work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.14.4
    • Unconfirmed
    • (Unassigned)

      I'm an idiot, ignore everything below. See first comment. Only leaving this here as a testament to my stupidity.

       

      Introduction
      I am working on a datapack with a friend that adds custom sword-variants to Minecraft, but I ran into a problem while trying to rename the placeholder items (spawn eggs) using language files in the resourcepack.

      Context
      I need to use placeholders because a crafting table recipe can not output an item with NBT, so it outputs a placeholder instead. I'm using spawn eggs because they are the only large set of unobtainable items with different item id's I could think of (potions do not work because they are only differentiated by NBT, which the crafting table cannot output).

      I retextured the spawn eggs to look like the shadow of the items you were crafting (to get around the colouring of the spawn eggs), but the name was still "... spawn egg", so I wanted to change it to match the name of the custom items. This however did not work as I expected it to.

      Problem and steps to reproduce
      I made a language file "en_us.json" in ".../assets/minecraft/lang" and put in the translation keys I wanted to change, which worked. The problem came when I tried to do this for "en_uk.json", which did not change the names (language set to UK of course). The weirdest part is that the translation key I added that is not in vanilla Minecraft ("combatpack.version", only used for debug), did work.
      I checked seven languages, of which only en_us and ja_jp did work properly, while en_uk, en_pt, lol_aa, nl_nl and nl_be did not work properly.
      There were no errors in the Minecraft client nor server log.

      Conclusion
      I tested Japanese as I found a resourcepack that had renamed items too, and I wanted to see if it was language specific or resourcepack specific. As both languages in the other resourcepack worked in that one, as well as in mine, I think it is language specific.

      I suspect the default Minecraft resourcepack can overwrite translation keys in certain languages, even if it is not the top selected resourcepack. While this is a more minor bug, it would be nice if it gets squashed in 1.15.

      Attachments
      The attached zip-file is the resourcepack in question, the screenshot showing Bat Spawn Egg is on the UK English setting and the screenshot showing Wooden Bat is on US English.

      PS: If anyone has a better idea for making the placeholders look more like the items they're supposed to represent, please mention it! Spawn eggs have so far been a nightmare to deal with as a lot of their properties are hardcoded.

        1. 2019-09-10_22.15.09.png
          2019-09-10_22.15.09.png
          127 kB
        2. 2019-09-10_22.16.02.png
          2019-09-10_22.16.02.png
          128 kB
        3. combatpack.zip
          36 kB

            Unassigned Unassigned
            MCommandguy MCommandguy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: