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

Villagers/Wandering traders double their Inventories when NBT reload

XMLWordPrintable

    • Unconfirmed
    • (Unassigned)

      When you edit/modify/produce an NBT reload of a villager or wandering trader, its inventory gets doubled. For example 1 bread turns into 2, 2 stacks of 20 seeds turn into 2 stacks of 40 seeds, 50 <item> turn into 100 <item> (a new stack is generated for storing the extra 36).

       

      Reproduction steps:

      1. Spawn a villager and give him any items you want (remember they can pick up food)

      2. Check his inventory with

      /data get entity @e[type=minecraft:villager,limit=1,sort=nearest] Inventory

      3. Update his NBT with any command, for example

      /data merge entity @e[type=minecraft:villager,limit=1,sort=nearest] {Health:15.0f}
      /data modify entity @e[type=minecraft:villager,limit=1,sort=nearest] Health set value 5.0f
      

      4. Check his inventory again. All items are doubled.

       

      If you try to modify the Count of one of his items, the result will be NewCount = InputCount + OldCount (instead of just NewCount = InputCount).

      If you try to modify the ID of one of his items, the result will be 1 stack of old item + 1 stack of input item (instead of just 1 stack of input item).

       

            Unassigned Unassigned
            FACS01 FACS01
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: