mojira.dev
MC-67885

Attributes don't stack

Attributes don't Stack, in any way. A sword with an attribute of 10 Attack Damage and sharpness doesn't change the sword any higher then 10 Attack Damage.

Example command

/give @p diamond_sword 1 0 {AttributeModifiers:[{AttributeName:"generic.attackDamage",Amount:5d,Operation:0,UUIDLeast:1l,UUIDMost:1l,Name:"testSword",Slot:"mainhand"}],ench:[{id:16,lvl:5}]}

A Full armor set designed to bring the players health down to 5 only counts for the last item you equip, or in the case of re logging only accounts for the helmets information.

An armor set that increases the players attack damage and a sword of +2 attack damage only give you +2 damage from the sword does not include the armor stats at all.

Keep in mind the +attack damage rewrites the swords damage, (I personally like it this way because a player that wants it to stack with the sword damage could just add the sword damage to the wanted attribute)

Linked issues

Comments 6

I can confirm this for MC 1.8-pre1.
In addition the effect that apears when relogging is already triggered by simply opening the Game menu.

Sharpness will combine with attackDamage although the number of the original command given as attackDamage, in a way, if you give yourself a sword with +14.25 Attack Damage, and bring out a villager, it should kill him in 2 hits. But when sharpness VI is given along with +14.25 Attack Damage, it will kill the villager in 1 hit. Both tests are conducted in the non-critical state of attacking.

Confirmed for

  • 15w37a for the first example:

    Example command

    /give @p diamond_sword 1 0 {AttributeModifiers:[{AttributeName:"generic.attackDamage",Amount:5d,Operation:0,UUIDLeast:1l,UUIDMost:1l,Name:"testSword",Slot:"mainhand"}],ench:[{id:16,lvl:5}]}

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

The sharpness sword appears to be doing more damage for me in 18w11a. Can anyone else confirm?

Tested in 20w07a.

/give @p diamond_sword{AttributeModifiers:[{AttributeName:"generic.attackDamage",Amount:5d,Operation:0,UUIDLeast:1l,UUIDMost:1l,Name:"testSword",Slot:"mainhand"}],Enchantments:[{id:sharpness,lvl:5}]}
/give @p diamond_sword{AttributeModifiers:[{AttributeName:"generic.attackDamage",Amount:5d,Operation:0,UUIDLeast:1l,UUIDMost:1l,Name:"testSword",Slot:"mainhand"}]}

Only the second sword can one-shot a sheep. Therefore this is no longer an issue.

Daniel Swifthawk Keeton

(Unassigned)

Confirmed

(Unassigned)

Minecraft 1.7.10, Minecraft 14w32a, Minecraft 14w32b, Minecraft 14w32c, Minecraft 14w32d, ..., Minecraft 14w33c, Minecraft 1.8-pre1, Minecraft 1.8.8, Minecraft 15w37a, Minecraft 16w32b

1.15.2

Retrieved