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

Activating a resource pack with an invalid JSON file on assets/minecraft/models/item will cause all other resource packs to unload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.13-pre7
    • None
    • Unconfirmed

      Background

      Resource packs modify textures, sounds, and other things.

      The bug

      When trying to load a resource pack with an improperly written JSON file on either assets/minecraft/models/item or assets/minecraft/models/block, you will notice that it unloads all other resource packs - including the Default one - which causes the game to show missing textures instead.

      What I expected to happen was...:
      The invalid JSON file should only show up the missing texture for either the block or item it is written for.

      What actually happened was...:
      The same file causes the game to display missing textures instead.

      Steps to Reproduce

      If you want to reproduce this bug for yourself, you may download the broken resource pack which can be found below; and then follow the usual steps for installing and activating a resource pack.

      • You will notice that it displays missing textures for all blocks instead of only the block or item the JSON file is written for.

      Causes

      From the resource pack, when trying to open the bat_spawn_egg.json file on the assets/minecraft/models/item folder, you will see this code:

      {
          "parent": "item/generated",
          "textures": {
              "layer0": "",
      	"layer1": "items/bat"
          }
      }
      

      The empty string on "layer0" will cause the JSON file to become invalid; and thus, the game throws out an error and attempts to unload all resource packs all at once - including the Default resource pack where it is not meant to be unloaded. This should not be the case on older versions.

      Possible fixes

      The resource pack itself has caused all other resource packs to unload themselves; so in order to work around this bug, you must press F3 + T on your keyboard in order to reload all resource packs.

      This will not fully fix the bug, as there will be missing translation strings. To fully fix it, use the same shortcut once again.

      Credits

      • Thanks to AntVenom for posting a video that demonstrates this bug, which can be found here.
      • The original post demonstrating this bug can be found here.

            Unassigned Unassigned
            jirauser283547 user-a4a49 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: