Details

    • Confirmation Status:
      Confirmed

      Description

      Note: All class, field and method names used are from the stable_29 MCP mappings.

      Due to a typo in LootEntry.Serialiser#serialize(), instances of LootEntryTable have their type set to "item" when serialised, instead of "loot_table". Any produced loot table containing these entries will error when they are deserialised.

      I have verified this in MCP 9.24(MC 1.9), MCP 9.28(MC 1.9.4), MCP 9.30(MC 1.10) and MCP 9.37(MC 1.11.2).

      Paul Fulham has verified this in snapshot 17w31b.

      The cause of this issue is this if statement in LootEntry.Serialiser#serialize():

      if (p_serialize_1_ instanceof LootEntryItem)
      {
          jsonobject.addProperty("type", "item");
      }
      else if (p_serialize_1_ instanceof LootEntryTable)
      {
          jsonobject.addProperty("type", "item");
      }
      

      The fix is to replace "item" with "loot_table".

      This bug is only exposed if mods or other third-party applications are used to serialise loot tables, as vanilla does not serialise them.

        Attachments

          Activity

            People

            • Assignee:
              dinnerbone [Mojang] Dinnerbone (Nathan Adams)
              Reporter:
              Daomephsta Daomephsta
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: