If you change a wolf's max_health
attribute and then modify its data (tested with AngerTime
, AngryAt
and Health), the max_health
attribute will reset to the default value of 8.0f.
Steps:
/tick freeze
/summon minecraft:wolf ~ ~ ~
/attribute @n[type=minecraft:wolf] minecraft:max_health base get
/attribute @n[type=minecraft:wolf] minecraft:max_health base set 1.0
/attribute @n[type=minecraft:wolf] minecraft:max_health base get
/data modify entity @n[type=minecraft:wolf] AngerTime set value 1
/attribute @n[type=minecraft:wolf] minecraft:max_health base get
Environment
Windows 11, JDK 21.0.4, Vanilla Minecraft Client.
Can confirm, but only when modifying AngerTime using commands, making it angry through normal gameplay does not change the attribute. I will update the title and description accordingly.