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
Linked issues
is duplicated by 11
Comments 13
The code analysis is similar to MC-71977.
this is still and issue, everytime the Wolf is reloaded its NBT data gets reset
RIP my friends "invincible dog"
Modifying NBT is not supported, but the health does reset to 20 after relog, which makes this a valid issue (updated title)