Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-71977

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w06a
    • Minecraft 1.7.10, Minecraft 14w34d, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.4, Minecraft 1.8.8, Minecraft 15w37a, Minecraft 15w47c, Minecraft 15w49a, Minecraft 15w49b, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.11.2, Minecraft 1.12.2, Minecraft 18w07c, Minecraft 18w08a, Minecraft 18w09a, Minecraft 18w10b, Minecraft 18w10c, Minecraft 18w10d, Minecraft 1.13-pre3, Minecraft 1.13.1, 1.14.4, 19w34a, 19w35a, 19w37a, 19w39a, 19w40a, 19w42a, 1.15 Pre-release 1, 1.15.2, 20w09a, 20w10a, 20w11a, 20w12a, 20w18a, 20w19a, 20w22a, 1.16 Pre-release 3, 21w18a, 21w20a, 1.17 Release Candidate 1, 1.18.1, 22w13a, 22w15a, 22w18a, 1.19 Pre-release 5, 1.19, 1.19.2, 1.19.3 Pre-release 2, 1.19.3, 23w03a, 23w04a, 1.20.1, 23w31a, 23w33a, 1.20.2, 23w51b, 24w05b
    • None
    • Confirmed
    • Commands, Entities
    • Low
    • Platform

      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 Avoma can be found in this comment.

            Unassigned Unassigned
            DiamondDragon721 Orbic
            Votes:
            32 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: