mojira.dev
MC-237917

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

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. 

Linked issues

Comments 1

Thank you for your report!
We're tracking this issue in MC-179949, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

CivetKitty

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved