mojira.dev
MC-298417

Modifying a wolf's data via commands resets its max health attribute

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:

  1. /tick freeze

  2. /summon minecraft:wolf ~ ~ ~

  3. /attribute @n[type=minecraft:wolf] minecraft:max_health base get

  4. /attribute @n[type=minecraft:wolf] minecraft:max_health base set 1.0

  5. /attribute @n[type=minecraft:wolf] minecraft:max_health base get

  6. /data modify entity @n[type=minecraft:wolf] AngerTime set value 1

  7. /attribute @n[type=minecraft:wolf] minecraft:max_health base get

Environment

Windows 11, JDK 21.0.4, Vanilla Minecraft Client.

Linked issues

Attachments

Comments

Cookie_qwq
[media]
clamlol

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.

clamlol

Also this seems to apply to Health and likely other data as well, not just AngerTime and AngryAt.

Cookie_qwq

(Unassigned)

Confirmed

Gameplay

Low

Commands, Entities

1.21.5, 1.21.6 Pre-Release 1

Retrieved