mojira.dev
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

Linked issues

Comments 13

Modifying NBT is not supported, but the health does reset to 20 after relog, which makes this a valid issue (updated title)

Can confirm in 20w51a.

Can confirm in 21w03a.

Can confirm in 1.18.1.

Can confirm in 1.18.2

3 more comments

Can confirm in 1.20.1 and its previous versions and snapshots.

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"

Can confirm in 23w51b.

Basemaker5

gnembon

Confirmed

Gameplay

Normal

Mob behaviour

command, mob

1.16.1, 20w27a, 20w29a, 1.16.3 Release Candidate 1, 1.16.3, ..., 1.20.1, 1.20.2, 23w42a, 23w51b, 24w05b

24w06a

Retrieved