The height of a wolf's tail which is indicating if a wolf is hurt is not based on the ration of Health
to maxHealth
but instead on the ration of Health
to 20.
This causes wild wolves which have 8 of 8 health to display as hurt.
Example command
/summon Wolf ~ ~ ~ {Attributes:[{Name:"generic.maxHealth",Base:0.5d}],Health:0.5f}
Linked issues
Comments 6
I don't know if this is a bug but also if you provide an invalid UUID the value for generic.maxHealth
is defaulted to 8d
instead of the provided value.
I think this report is valid because the fact that the tamed wolf is not using the set maxHealth
value is MC-71977, which means that they should support different maxHealth
values which makes this report valid I assume
No what I meant is that it uses the default value instead of the provided one, which sounds like MC-71977
Confirmed. From 1.8 MCP EntityWolf class:
The 20.0F could instead receive the maxHealth attribute value. Note that currently, tame wolves cannot have their maxHealth changed via commands (as it will always revert back to 20.0 when tame).
Example using "getMaxHealth", which returns the generic.maxHealth attribute value of the entity:
EDIT: Actually according to the snippet, untamed wolves will have a tail height of (pi / 5) at all times, rather than being dependent on its Health value. This suggests it's intended for untamed wolves. While the problem is still potentially present for tame wolves, tame wolves can only ever have a maxHealth of 20.0.