Player health doesn't sync properly with /attribute minecraft:generic.max_health
Expected: Command below would set my health to half heart, and 20 would set my health to 10 hearts
/attribute @p minecraft:generic.max_health base set 1 /attribute @p minecraft:generic.max_health base set 2 /attribute @p minecraft:generic.max_health base set 3 /attribute @p minecraft:generic.max_health base set 4
Observed:
1 and 2 both set it to a full heart, 3 and 4 both set it to 2 full hearts
Created Issue:
Attribute minecraft:generic.max_health doesn't do half hearts
Expected: Command below would set my health to half heart, and 20 would set my health to 10 hearts
/attribute KaleyObsidia minecraft:generic.max_health base set 1 = half heart
/attribute KaleyObsidia minecraft:generic.max_health base set 2 = full heart
/attribute KaleyObsidia minecraft:generic.max_health base set 3 = 1.5 hearts
/attribute KaleyObsidia minecraft:generic.max_health base set 4 = 2 full hearts
Observed:
1 and 2 both set it to a full heart, 3 and 4 both set it to 2 full hearts
Attribute minecraft:generic.max_healthdoesn't dohalf heartsPlayer health doesn't sync properly with /attribute minecraft:generic.max_health for half hearts
Workaround: I gave myself instant health effect and it immediately synced my health to max_health:
Expected: Command below would set my health to half heart, and 20 would set my health to 10 hearts
/attribute KaleyObsidia minecraft:generic.max_health base set 1 = half heart
/attribute KaleyObsidia minecraft:generic.max_health base set 2 = full heart
/attribute KaleyObsidia minecraft:generic.max_health base set 3 = 1.5 hearts
/attribute KaleyObsidia minecraft:generic.max_health base set 4 = 2 full hearts
Observed:
1 and 2 both set it to a full heart, 3 and 4 both set it to 2 full hearts
Expected: Command below would set my health to half heart, and 20 would set my health to 10 hearts
/attribute @p minecraft:generic.max_health base set 1 = half heart /attribute @p minecraft:generic.max_health base set 2 = full heart /attribute @p minecraft:generic.max_health base set 3 = 1.5 hearts /attribute @p minecraft:generic.max_health base set 4 = 2 full heartsObserved:
1 and 2 both set it to a full heart, 3 and 4 both set it to 2 full hearts
Expected: Command below would set my health to half heart, and 20 would set my health to 10 hearts
/attribute @p minecraft:generic.max_health base set 1= half heart/attribute @p minecraft:generic.max_health base set 2= full heart/attribute @p minecraft:generic.max_health base set 3= 1.5 hearts/attribute @p minecraft:generic.max_health base set 4= 2 full heartsObserved:
1 and 2 both set it to a full heart, 3 and 4 both set it to 2 full hearts
Player health doesn't sync properly with /attribute minecraft:generic.max_healthfor half hearts
duplicates
duplicates
duplicates





Seems to be a sync issue – max_health sets correctly, but your current health is wrong. If you take a half heart of damage you don't regenerate the "extra".
The bug is actually different: Your current health does not get reduced to the maximum health at all. Changing the maximum health from e.g. 20 to 1 just hides the last 9 hearts, so you don't see that they're still full, but you see the last heart being full. Closing and reopening the world fixes this for some reason.
Resolving as duplicate of
MC-180001since that describes the underlying bug better.