mojira.dev
MC-41358

Percent Attack Damage on Armor

This is a problem with attributes, specifically generic.attackDamage.

When putting the attack damage attribute on a helmet, it dealt increased damage when I punched a spider. When I switched to my sword and back to my fist, the spider took only normal damage. The damage did not increase when I used both the sword and helmet, only the sword dealt damage.

Helmet:

/give @p minecraft:iron_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDLeast:852852,UUIDMost:258},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:10,Operation:0,UUIDLeast:852852,UUIDMost:258}],display:{Name:"Warrior Helmet"}}

Sword:

/give @p minecraft:iron_sword 1 0 {AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:10,Operation:0,UUIDLeast:852852,UUIDMost:258}],display:{Name:"Warrior Sword"}}

Comments 1

Your commands are incorrect (you forgot to specify the compound tag under AttributeModifiers).
Unable to reproduce even with the correct commands:

/give @p minecraft:iron_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:40,Operation:0,UUIDLeast:852852,UUIDMost:258},{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:10,Operation:0,UUIDLeast:852852,UUIDMost:258},display:{Name:"Warrior Helmet"}]}
/give @p minecraft:iron_sword 1 0 {AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:10,Operation:0,UUIDLeast:852852,UUIDMost:258},display:{Name:"Warrior Sword"}]}

Andrew Priest

(Unassigned)

Unconfirmed

attributes, command_block

Minecraft 1.7.2

Retrieved