The Bug
You cannot /summon a wolf with modified health AND an Owner UUID. You also cannot use /data to modify the wolf's health data if it is tamed (i.e. it has an Owner UUID).
What I expected to happen was...
When executing (the Owner UUID used here is a random number):
/summon minecraft:wolf ~ ~ ~ {Health:200,Owner:[I;-1953028026,-856931226,-1240793240,-1598231354],Attributes:[
{Name:"generic.max_health",Base:200f}]}
The wolf will be summoned with the correct owner, max health of 200, and current health of 200.
When executing:
/data merge entity @e[type=wolf,limit=1] {Attribute:[
{Name:"minecraft:generic.max_health",Base:30}]}
On a wolf that is already tamed, the max health will be changed to 30.
What actually happened was...
When executing:
/summon minecraft:wolf ~ ~ ~ {Health:200,Owner:[I;-1953028026,-856931226,-1240793240,-1598231354],Attributes:[
{Name:"generic.max_health",Base:200f}]}
The wolf will be summoned with the correct owner, but the health changes are not present.
When executing:
/data merge entity @e[type=wolf,limit=1] {Attribute:[
{Name:"minecraft:generic.max_health",Base:30}]}
On a wolf that is already tamed, the health changes are not present; nothing happens even though the chat/command block output will say "Modified entity data of Wolf".
Steps to reproduce:
- Play on a 1.19.4 Minecraft world with cheats enabled (I have only tested this bug on 1.19.4, it could be present in more versions).
- Execute the following command through chat, command block, or some other means: /summon minecraft:wolf ~ ~ ~
{Health:200,Owner:[I;-1953028026,-856931226,-1240793240,-1598231354],Attributes:[ \{Name:"generic.max_health",Base:200f}
]}
- Check the wolf's data using: /data get entity @e[type=wolf,sort=nearest,limit=1]
- Notice the wolf's Owner data is successfully set, but not the max health or current health data.
OR
- Play on a 1.19.4 Minecraft world with cheats enabled.
- Execute the following command through chat, command block, or some other means: /summon minecraft:wolf ~ ~ ~
- Execute: /data merge entity @e[type=wolf,limit=1] {Attribute:[
{Name:"minecraft:generic.max_health",Base:30}
]}
- Check the wolf's data using: /data get entity @e[type=wolf,sort=nearest,limit=1]
- Notice the wolf's max health and current health data are still the default values.
- duplicates
-
MC-193202 Tamed wolf health resets when NBT is loaded (e.g. relog)
- Resolved