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

'Data Merge Entity' duplicates villager inventory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.2 Pre-release 1
    • None
    • Unconfirmed
    • (Unassigned)

      I discovered an inventory duplication bug that occurs when using '/data merge entity' on a villager. I have attached a datapack to use as an example, but the bug is not limited to only this datapack.

      To Reproduce:
      1- Spawn new villager
      2- Give villager 1 stack of carrots
      3- Run '/data get entity' to confirm 1 stack of carrots in inventory
      4- Nametag the villager "silence me" to trigger datapack function that runs the following command:

      execute as @e[name="silence me"] at @s run data merge entity @s {CustomName:"{\"text\":\"silenced\"}",Silent:1b,ActiveEffects:[{Id:24b,Duration:5,ShowParticles:0b}]}
      

      5- Run '/data get entity' to now see 2 stacks of carrots in inventory
      6- Repeat steps 4 + 5 and you will now see 4 stacks of carrots in inventory

      Everytime '/data merge entity' is run on the villager, the inventory doubles.

       

            Unassigned Unassigned
            Kawsiphek Kawsiphek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: