mojira.dev
MC-16466

Attributes with same UUID don't stack when wearing armour

When putting on pieces of armor, the attributes didn't stack up. I had on a pair of boots that gave me -10% speed, a chestplate that gave me -25% speed, and a pair of leggings that gave me -35% speed. However the effect applied to me was only the one of the last piece of armor I applied, not all of them added together. The operation applied to each piece of armor was 1, so in theory I should have had -70% speed, but it was pretty obvious that that was not the effect I had.

Linked issues

MC-31042 Glitchy funtion with more than one peice of atribute armour/ held item Resolved MC-39426 Attributes don't Stack Resolved MC-50764 The same kind Attributes do not combine if they are on different items (Armor Slots and Active Slot) Resolved MC-71020 Adding Atributes with armor and items. Resolved MC-77478 Max HP attributes cancel each other out. Resolved

Attachments

Comments 8

I'm going to need to see all the attribute modifiers in question. Do they all have the same UUID or different ones? Modifiers with the same UUID will not stack (by design).

Here's a video showing exactly what happens (plus another bug to do with taking the armour off): http://www.youtube.com/watch?v=e7IpyDZHqpg&feature=youtu.be
And here's the NBT data: http://imgur.com/g6LC4zA

I don´t see UUIDLeast and UUIDMost in the screen. Try to add these beside Amount, AttributeName, Name and Operator, and give the different values. Like DB said, attribute modifiers with the same UUID´s will not stack up.
Here is a screenshot http://imgur.com/9iQGEPR
Note: My UUID´s are just 0, so the would not stack up. If you want them to stack up, you have to set the UUID´s to different values.

Oh whoops. The NBT data on the item didn't include UUIDs, but I added them in and it worked fine! 😃 Thanks!

This seems to be a problem in the latest 1.7 snapshots (and possibly earlier releases) but if two items have the same UUIDs but one is armor and the other is an item, if you wear the armor then hold the item and then select a different item in your hotbar both the effects disappear.

These are the commands I used (you will need to put it into a command block):

/give @p 283 1 0 {AttributeModifiers:[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.4,Operation:1,UUIDMost:67664,UUIDLeast:2745}]}

/give @p 317 1 0 {AttributeModifiers:[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.4,Operation:1,UUIDMost:67664,UUIDLeast:2745}]}

Put on the boots while you have nothing in your hand then switch to the sword and switch back.

Two same UUIDLeasts and UUIDMosts attributes don't stack. I personally do mine as first item with AttributeModifiers, I will put them UUIDLeast and UUIDMost with 1, and so on.

Tan Chn Cheern 's idea worked for me. Thank you!

WumpaCraft

Nathan Adams

Unconfirmed

armor, attribute

Snapshot 13w21a

Retrieved