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
- Summon a wolf
/summon wolf
- Tame the wolf with a bone
- Damage the wolf by one half-heart
- View the wolf's health
/data get entity @e[type=wolf,sort=nearest,limit=1] Health
→
The wolf's health is 19.0f - Attempt to change the wolf's health to 10.0f
/data modify entity @e[type=wolf,sort=nearest,limit=1] Health set value 10
- 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
2020-07-02, 07:37 AM
2024-02-07, 11:26 AM
2024-02-07, 11:26 AM
25
19