mojira.dev
MC-88085

Summoning items with custom attributes doesn't include default attribtes

If you summon item (like an armor piece or a sword) with an attribute added to it, it will lose its natural attributes (like the generic.armor attribute, wich gives the player armor points), in order to get these natural attributes back, you need to add them to the command.
Here´s an example:

/summon Item ~ ~1 ~ {Item:{Count:1,id:leather_chestplate,tag:{display:{color:500,Name:Cool Blue Awesome Shirt},AttributeModifiers:[{Slot:torso,AttributeName:generic.maxHealth,Name:generic.maxHealth,Amount:20,Operation:0,UUIDLeast:1,UUIDMost:1}]}}}

This Leather Chestplate will lose its armor points, you will have to re-add them in the command.

Linked issues

Comments 3

I used armor as an example, but it happens with every item like swords or axes.

that's intended, vallina minecraft items uses the attribute modifiers tag, adding this tag means removing the default and replacing it with the new one

Probably not a bug, but they should solve that, if you want to add the generic.attackSpeed Modifier to a sword, you probably don´t want it to lose its attack damage.

JessePinkerman

(Unassigned)

Unconfirmed

Minecraft 15w36d

Retrieved