Players spawn with 20 health, not with maximum health.
I made an armor that takes 10 health then I died with the armor in my hand (gamerule keepInventory was true) and respawned with it in my hand too, and my health was 20!
I don't know if it's a feature or a bug.
Also, if I wear the armor my maximum health doesn't change, only if I hold it the max health changes.
Environment
Windows XP
Java7
Created Issue:
Players spawn with 20 health, not with maximum health.
I made an armor that takes 10 health then I died with the armor in my hand (gamerule keepInventory was true) and respawned with it in my hand too, and my health was 20!
I don't know if it's a feature or a bug.
Also, if I wear the armor my maximum health doesn't change, only if I hold it the max health changes.Environment
Windows XP
Java7
is duplicated by
is duplicated by
is duplicated by
Unfixable. MC-16773
Dupe of MC-16773.
Reproduce
- Change player's attribute via command
/attribute @s minecraft:generic.max_health base set 1.0
- Die and respawn
/kill
- Check the attribute
/attribute @s minecraft:generic.max_health base get
The value is 20.0f as default rather than 1.0f which is expected.
This bug is related to MC-16773 to some extent, when Adams implied this may change after "we have more control over how attribute modifiers are applied." But now we still don't get a method to keep a changed attribute value during respawning, though attribute command is provided.
It's because you respawn before getting that item to increase your health. Consider it working as intended for the current time being until we have more control over how attribute modifiers are applied.
Relates to
MC-16345. I really hope this gets fixed eventually, it is a huge problem when using attributes.