mojira.dev
MC-101517

When equipping multiple armour items attributes override instead of stacking

When an item with custom attributes is equipped (such as a chest plate with +3 armour and +5 health) the attributes are applied. However if you also equip another item with attributes, the second item's attributes are applied and replace the attributes of the first item.

(attributes don't stack)

Linked issues

Comments 2

Please provide exact commands used.

/give @p minecraft:leather_chestplate 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:5,Operation:0,UUIDLeast:309000,UUIDMost:77174,Slot:"chest"}]}

/give @p minecraft:leather_leggings 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:5,Operation:0,UUIDLeast:309000,UUIDMost:77174,Slot:"legs"}]}

if you equip both items you will only get a total of +5 (2.5 full hearts, 5 half hearts) health. However the fact that 5+5=10 means that the attributes dont stack

The same effect is in place if the commands used the movement speed, armour, and knockback resistance attributes. the rest have not been tested

Zack

(Unassigned)

Unconfirmed

Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2

Retrieved