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

[/data command] Remove items of piglin inventorys doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.1, 20w29a
    • Windows 10;
      Java 1.8.0_51 64bit (the one minecraft comes with)
    • Unconfirmed
    • (Unassigned)

      Hi, I hope I didn't overlooked an already existing bugreport but pretty sure it isn't WAI.

      Basically you can add items to an Inventory of a piglin but can't remove it or set the count lower via /data. But it works for things like Handitems of the same piglin. It even duplicates every (non selected) slot of the piglin inventory.

       

      Steps to Reproduce:
      1.) spawn a piglin via

      /summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b,NoAI:1b,Inventory[{id:"minecraft:stone",Count:2b}]}

      2.) try to remove the stone:

      /data remove entity @e[type=minecraft:piglin,limit=1,sort=nearest] Inventory[0]

      It says "Modified entity data of Piglin"

      3.) run

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

       We get the feedback "Piglin has the following entity data: [\{id: "minecraft:stone",Count: 2b}]"

      Please note:

      • Works too, if the piglin itself picket up items (will pick up if in the piglins loved tag).
      • NoAI:1b was set so the piglin don't wander of and IsImmuneToZombification to work in the overworld but these aren't necessary at all to see the bug.
      • If you try to override the Inventory list with another one, like with chest placed right under you
      /data modify entity @e[type=minecraft:piglin,limit=1,sort=nearest] Inventory set from block ~ ~ ~ Items

      it will add all the items of the chest   but will not remove any from the piglins inventory.

      • If you do
      /data modify entity @e[type=minecraft:piglin,limit=1,sort=nearest] Inventory[0].Count set value 1

       it will add all positive values but not substract negative ones. 

      • Yes I'm on a fresh singleplayer world without datapacks and it happens without any mods.

        1. 2020-07-21_01.48.02.png
          2020-07-21_01.48.02.png
          456 kB
        2. 2020-07-21_01.45.41.png
          2020-07-21_01.45.41.png
          518 kB
        3. 2020-07-21_01.47.57.png
          2020-07-21_01.47.57.png
          471 kB
        4. 2020-07-21_01.45.32.png
          2020-07-21_01.45.32.png
          506 kB
        5. 2020-07-21_01.45.15.png
          2020-07-21_01.45.15.png
          494 kB
        6. 2020-07-21_01.44.43.png
          2020-07-21_01.44.43.png
          447 kB
        7. 2020-07-21_01.44.11.png
          2020-07-21_01.44.11.png
          454 kB
        8. 2020-07-21_01.43.19.png
          2020-07-21_01.43.19.png
          410 kB
        9. 2020-07-21_01.43.14.png
          2020-07-21_01.43.14.png
          396 kB
        10. 2020-07-21_01.42.21.png
          2020-07-21_01.42.21.png
          404 kB
        11. 2020-07-21_01.45.05.png
          2020-07-21_01.45.05.png
          179 kB
        12. 2020-07-21_01.42.15.png
          2020-07-21_01.42.15.png
          384 kB
        13. 2020-07-21_01.39.41.png
          2020-07-21_01.39.41.png
          269 kB
        14. 2020-07-21_01.39.13.png
          2020-07-21_01.39.13.png
          244 kB
        15. 2020-07-21_01.38.45.png
          2020-07-21_01.38.45.png
          229 kB
        16. 2020-07-21_01.38.03.png
          2020-07-21_01.38.03.png
          169 kB
        17. 2020-07-21_01.41.44.png
          2020-07-21_01.41.44.png
          147 kB

            Unassigned Unassigned
            Feuerreiter Feurreiter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: