mainhand
is missing/omitted in player equipment
NBT.
Observed results:
The command /data modify entity @n[type=zombie] equipment set from entity @s equipment
copies armor items and offhand item, excluding the mainhand weapon.
Expected behavior:
All equipment worn/held equipment is copied to the mob.
Linked issues
is duplicated by 1
Comments 3
Yeah this is probably intended, it isnβt really desirable to duplicate the item already stored in Inventory
.
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History β Snapshot Version History β The official Minecraft feedback site
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki
From the 1.21.5 changelog:
Equipment Data
The ArmorItems, HandItems, and body_armor_item fields have been merged into an equipment field
Format: map between equipment slot type and item stack
Valid equipment slots: head, chest, legs, feet, mainhand, offhand, body, saddle
If not specified or removed, the entity will have no equipment
e.g. equipment:{chest:{id:'minecraft:diamond_chestplate'}}
This affects all mobs and Armor Stands
The armor and off-hand equipment of Players is now also stored in the equipment field (although items written into the Inventory using armor and off-hand slot numbers still work)
The last line probably means that mainhand is not supposed to be stored in players.