The player cannot use the /item
command to edit or clear piglin inventories (including the hand* and armor slots). The hand slots are a partial case, as they can be modified using the weapon.mainhand/offhand, but not with a dedicated slot like villagers.
Steps to Reproduce:
Spawn a piglin with armor:
/summon piglin ~ ~ ~ {ArmorItems:[{},{},{id:"minecraft:golden_chestplate",count:1},{}]}
Try and replace its chestplate:
/item replace entity @e[type=minecraft:piglin,sort=nearest,limit=1] armor.body with minecraft:diamond_chestplate
Observed Behavior:
The command fails, and sends the following error:
[media]
Expected Result:
The command would properly execute as it would with other mobs.
Original Description:
It is not possible to edit piglin inventories with /item replace (just the hand and armour slots). This is inconsistent, as you CAN edit the inventories of villagers (villagers have villager.x slots counted from 0 to 7.), donkeys, llamas and even wandering traders and pillagers! Piglins' are not accesible in the same manner however.
Linked issues
Attachments
Comments 3
This issue is specially critical as removing items from the inventory using /data remove, merge, or modify doesn't seam to work.
I can confirm for 1.16.3