mojira.dev
MC-278994

Wolves can't be spawned with modified max health attribute

When spawning a wolf with entity data that modifies "max_health" it does not spawn with the correct attribute base.

for example

/summon wolf ~ ~ ~ {attributes:[{id:max_health,base:200d}]}

will still spawn with the standard 8.0d base.1

This issue only occurs when a wolf is summoned without an Owner tag; otherwise, the attribute is set properly.

Related issues

Comments

Luzimia

Thank you for your report!

I checked, and it can be confirmed by a moderator.

The attribute isn't set correctly while other attributes work fine.

I tested with the scale and it work, look like a specific issue with max_health. This look related to MC-197818 but they are talking about NBT, but maybe the actual issue is that this attribute is reset at mob spawning, this can explain why after spawning the attribute work well when you modify it, feel free to read the MC-197818 issue if you want more info.

If you want a temporary fix, you can do "/attribute @e[type=wolf, limit=1] minecraft:max_health base set 200" to modify the attribute after spawning the mob.

tryashtar

Updated issue to note this is limited to wolves and is unrelated to spawn eggs

TheRedVillager

(Unassigned)

Confirmed

Platform

Low

Commands

1.21.4 Pre-Release 1, 1.21.4, 1.21.6 Pre-Release 1

Retrieved