Mojira Archive
MC-71977

Changing generic.attack_damage of tamed wolf has no effect / taming wolf removes custom generic.attack_damage

The bug

Changing the generic.attack_damage attribute of a tamed wolf does not appear to have any effect. Similarly taming a wolf with a custom generic.attack_damage attribute value changes it to the default.

This does not affect the Strength potion effect in the latest game versions when applied with potions or /effect; summoning a mob with ActiveEffects is MC-32575.
See MC-193202 for the health of a wolf resetting.

Reproduction steps (modifying attribute)

  1. Summon a wolf
  2. Tame it
  3. Change its attributes
    /data merge entity @e[type=wolf,limit=1] {Attributes:[{Name:generic.attack_damage,Base:20.0f}]}
    
  4. Let it attack an entity (by punching that entity) or inspect its NBT data
    /data get entity @e[type=wolf,limit=1,sort=nearest] Attributes
    

    It has the default generic.attack_damage

Reproduction steps (taming wolf with custom attribute)

  1. Summon a wolf with a custom attribute
    /summon minecraft:wolf ~ ~ ~ {Attributes:[{Name:generic.attack_damage,Base:20.0f}]}
    
  2. Inspect its NBT to make sure it has the custom attribute
    /data get entity @e[type=wolf,limit=1,sort=nearest] Attributes
    

    It shows the custom attribute

  3. Tame the wolf
  4. Let it attack an entity (by punching that entity) or inspect its NBT data
    /data get entity @e[type=wolf,limit=1,sort=nearest] Attributes
    

    It has the default generic.attack_damage

Code analysis

Code analysis by [Mod] Avoma can be found in this comment.