mojira.dev
MC-172600

Piglin cannot be spawned/edited to hold an item in their offhand

Summon a piglin with any secondary item in their offhand and the item is stored in their inventory or placed in an armor slot rather than held in their offhand. If the offhand item is golden this will take the place of the primary held item (e.g. golden sword will replace the crossbow) or will be worn (e.g. golden leggings will be put on instantly).

Example:

/summon minecraft:piglin ~ ~ ~ {HandItems:[{id:"crossbow",Count:1b},{id:"firework_rocket",Count:1b}]}

Entity data of the spawned piglin:

/summon minecraft:piglin -33.49 76.00 -5.14 {Brain: {memories: {}}, HurtByTimestamp: 0, Attributes: [\{Base: 16.0d, Name: "generic.maxHealth"}, \{Base: 0.0d, Name: "generic.knockbackResistance"}, \{Base: 0.5d, Name: "generic.movementSpeed"}, \{Base: 0.0d, Name: "generic.armor"}, \{Base: 0.0d, Name: "generic.armorToughness"}, \{Base: 16.0d, Name: "generic.followRange"}, \{Base: 0.0d, Name: "generic.attackKnockback"}, \{Base: 5.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], PersistenceRequired: 1b, Motion: [-0.04004690834616576d, -0.0784000015258789d, -0.04205122001766073d], Health: 16.0f, LeftHanded: 0b, Air: 256s, OnGround: 1b, Rotation: [144.76523f, 0.0f], HandItems: [\{id: "minecraft:crossbow", Count: 1b, tag: {Damage: 0}}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CanPickUpLoot: 1b, HurtTime: 0s, Inventory: [\{id: "minecraft:firework_rocket", Count: 1b}]}

Linked issues

Comments 3

Probably something to do with piglins holding gold after bartering.

hi storm same problem ๐Ÿ™‚ย and piglins have 16 instead of 24

Piglins use their offhand to examine gold items

stormfrenzy

(Unassigned)

Confirmed

Commands

20w07a

Retrieved