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

"set_nbt" function in loot table does not merge NBT to item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 17w47b, Minecraft 17w48a
    • Fix Version/s: Minecraft 17w49a
    • Labels:
      None
    • Environment:
      Windows 10, Minecraft's included Java
    • Confirmation Status:
      Confirmed

      Description

      The bug

      "function": "set_nbt" in loot tables does nothing. Loot tables that worked in 1.12 don't show an error when loaded, but when the item is dropped the NBT data is not applied to it. This causes, for example, uncraftable potions in fishing and uncraftable arrows dropped by strays.

      Code analysis

      It appears that in 17w48a's bka class, the NBT data from the item is merged to the NBT data from the table, but is not merged back onto the item.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dinnerbone [Mojang] Nathan Adams
              Reporter:
              RichardAHallett Richard A. Hallett
              Votes:
              11 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: