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

You cannot edit the inventories of piglin by using '/item replace'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 20w17a, 20w18a, 20w19a, 20w20a, 20w21a, 1.16 Pre-release 1, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4, 20w45a, 20w49a, 20w51a, 21w03a, 1.16.5 Release Candidate 1, 1.16.5, 21w07a, 21w08b, 21w11a, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w40a, 21w44a, 1.18 Release Candidate 1, 1.18.1, 22w03a, 1.20.5 Pre-Release 1, 1.20.6, 24w21b
    • Community Consensus
    • Commands
    • Important
    • Platform

      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:

      1. Spawn a piglin with armor:
        /summon piglin ~ ~ ~ {ArmorItems:[{},{},{id:"minecraft:golden_chestplate",count:1},{}]}
        
      2. 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:

      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.

            Unassigned Unassigned
            Jingy [Mod] Jiingy
            Votes:
            14 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              CHK: