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

Tamed wolf health resets when NBT is loaded (e.g. relog)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w06a
    • 1.16.1, 20w27a, 20w29a, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4, 20w51a, 21w03a, 1.16.5, 21w18a, 1.17, 1.18.1, 1.18.2, 22w15a, 22w18a, 1.19, 1.19.2, 1.19.4, 23w14a, 1.20.1, 1.20.2, 23w42a, 23w51b, 24w05b
    • Confirmed
    • Mob behaviour
    • Normal
    • Gameplay

      The bug

      If a tamed wolf's Health NBT is modified by the /data or /execute store commands, it is always set to 20.0f, regardless of its previous value or what it should have been modified to. This does not happen with untamed wolves, tamed/untamed cats, or tamed/untamed parrots.

      How to reproduce

      1. Summon a wolf
        /summon wolf
      2. Tame the wolf with a bone
      3. Damage the wolf by one half-heart
      4. View the wolf's health
        /data get entity @e[type=wolf,sort=nearest,limit=1] Health

        The wolf's health is 19.0f

      5. Attempt to change the wolf's health to 10.0f
        /data modify entity @e[type=wolf,sort=nearest,limit=1] Health set value 10
      6. View the wolf's health
        /data get entity @e[type=wolf,sort=nearest,limit=1] Health

        The wolf's health is 20.0f, rather than the expected 10.0f

            gnembon [Mojang] Gnembon
            Basemaker5 Basemaker5
            Votes:
            25 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: