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

Unable to use /item to clear piglin inventory to clear it.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1
    • None
    • Unconfirmed
    • (Unassigned)

      How to reproduce

      1. Give a piglin a gold block and a raw gold block. The command 
      /data get entity @e[type=piglin,limit=1,sort=nearest]nventory
      

       results in 

      [{id:"minecraft:gold_block",Count:1b}],{id:"minecraft:raw_gold_block",Count:1b}]
      1. Use the command 
      /item replace entity @e[limit=1,sort=nearest,type=piglin] villager.0 with air 1

       

      Expected Behavior: The gold block is removed.

      Reality: the nbt is unchanged. Other commands such as data merge, data remove, and data modify also fails to remove the items from the inventory. 

       

      Villager inventories are tricky to work with, and the only way to manipulate them as far as I know is to use /item replace. However, piglin inventories, dispite working exactly like villagers, cannot be modified using the command. 

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

              Created:
              Updated:
              Resolved: