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

Wild wolves deal 4 points (2 hearts) of damage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.2, 1.16.5, 21w10a, 22w11a, 22w13a, 1.19.3, 23w04a
    • None
    • Confirmed
    • Mob behaviour

      The bug

      Wild wolves deal 4 points (2 hearts) of damage in Normal mode.

      Expected result

      Wild wolves should deal 2 points (1 heart) of damage. For every other mob in the game, this is the amount of damage done in Normal mode. (Some exceptions exist, such as hoglins randomized damage or mobs holding items, but they're all still based on this number.)

      Code analysis

      In the file Wolf.java, the wolf's damage is set to 2 (1 heart) with this code: add(Attributes.ATTACK_DAMAGE, 2.0).

      Later in the code:

      public void setTame(boolean bl) {
       super.setTame(bl);
       if (bl) {
       this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(20.0);
       this.setHealth(20.0f);
      } else {
      this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(8.0);
      }
      this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(4.0);
       }
      

      The bit that sets the tamed wolf's attack damage to 4 does not actually test if the wolf is tamed or not. This is most likely a bug as there's no reason to take all these extra steps.

            Unassigned Unassigned
            PancakeIdentity PancakeIdentity
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: