Mojira Archive
MC-193202

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

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

Fixed

Basemaker5

[Mojang] Gnembon

2020-07-02, 07:37 AM

2024-02-07, 11:26 AM

2024-02-07, 11:26 AM

25

19

Confirmed

Normal

Gameplay

Mob behaviour

command, mob

1.16.1 - 24w05b1.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

24w06a