1

Im using command blocks to give players custom armor, and I ran into a slight problem. All the armor (except the boots) are not actually giving bars of armor in survival mode and will not actually act as protection. Here is the command for the boots:

/give @p chainmail_boots 1 0 {display:{Name:"Archer Boots",Lore:["You feel somewhat lighter,and resistant to ranged damage"]},ench:[{id:0,lvl:2},{id:2,lvl:2},{id:4,lvl:2}],Unbreakable:1}

Which as I said do provide armor bars/protection in survival, however the following command is to summon my helmet:

/give @p chainmail_helmet 1 0 {display:{Name:"Archer Helmet",Lore:["You feel somewhat faster, and resistant to ranged damage"]},AttributeModifiers:[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:0.10,Operation:0,UUIDMost:24682,UUIDLeast:195471}],ench:[{id:0,lvl:2},{id:4,lvl:2}],Unbreakable:1}

And that helmet does not provide any protection when worn. Am I missing something?

3

As of 1.9, armor is now an attribute, named generic.armor.

When the AttributeModifiers tag is specified on an item, any default modifiers are ignored, which includes the generic.armor modifier for armor (and generic.armorToughness for diamond armor as well).

You will need to re-specify those modifiers. You may also want to use the new Slot string tag for modifiers, which allows you to specify exactly which armor slot the modifier applies in (with values "head", "chest", "legs", "feet", "mainhand", and "offhand").

/give @p chainmail_helmet 1 0 {display:{Name:"Archer Helmet",Lore:["You feel somewhat faster, and resistant to ranged damage"]},AttributeModifiers:[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Slot:"head",Amount:0.10,Operation:0,UUIDMost:24682,UUIDLeast:195471},{AttributeName:"generic.armor",Name:"armor",Slot:"head",Amount:2.0,Operation:0,UUIDMost:1,UUIDLeast:1}],ench:[{id:0,lvl:2},{id:4,lvl:2}],Unbreakable:1}

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.