0

So I am trying to create custom armor with custom armor points, and I have this so far:

/give @p minecraft:leather_boots 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:864875,UUIDMost:576998,Slot:"feet"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:1,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"feet"}],display:{Name:"Stone Boots",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_leggings 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:864875,UUIDMost:576998,Slot:"legs"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:3,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"legs"}],display:{Name:"Stone Leggings",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_chestplate 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:864875,UUIDMost:576998,Slot:"chest"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:4,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"chest"}],display:{Name:"Stone Chestplate",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:864875,UUIDMost:576998,Slot:"head"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:2,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"head"}],display:{Name:"Stone Helmet",Lore:["5% Knockback Resistance"],color:10066329}}

But whenever I put them all on, instead of adding the amount of armor points, they somehow overlap each other.

1

UUIDLeast and UUIDMost are used to create an ID number that is different from the rest to label each attribute. They are not a range of numbers. If set them all to 1 and 1000 and it will not pick a random number in that range. Think of them as pairs. The pairs have to be different for each attribute. If you use the same pair to label different attributes, you are actually creating a conflict which forces one attribute to overwrite another.

In your example you have 4 items, each with 2 attribute modifiers. This means you need 8 unique pairs of numbers.

One possible solution would be UUIDLeast:1 and UUIDMost:1-8.

That would look like:

/give @p minecraft:leather_boots 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"feet"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:2,Slot:"feet"}],display:{Name:"Stone Boots",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_leggings 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:1,UUIDMost:3,Slot:"legs"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:4,Slot:"legs"}],display:{Name:"Stone Leggings",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_chestplate 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:1,UUIDMost:5,Slot:"chest"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:6,Slot:"chest"}],display:{Name:"Stone Chestplate",Lore:["5% Knockback Resistance"],color:10066329}}

/give @p minecraft:leather_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:.05,Operation:0,UUIDLeast:1,UUIDMost:7,Slot:"head"},{AttributeName:"generic.armor",Name:"generic.armor",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:8,Slot:"head"}],display:{Name:"Stone Helmet",Lore:["5% Knockback Resistance"],color:10066329}}
0

You have given each attribute type the same UUID (Universally Unique IDentifier) for every piece of armor. UUIDs are how Minecraft tells individual attribute modifiers apart; equip a piece of armor while you already have a modifier with that same UUID, and Minecraft will just replace the old one with the new one (or keep the old one and ignore the new one, I don't remember which).

TL;DR: Each piece of armor needs a unique UUID for each modifier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.