When you have any excess health (as in health that was there before, say, an armour piece with +10 max health was removed, leaving you with 30 health but 20 max health), updating it (taking damage or healing) should reduce it to your max health. However, whenever this happens, it seems to remove twice the amount of health before quickly healing back to where it should've gone to (video 1). This can result in a strange, quasi-dead-state visual glitch if your health was low enough (video 2).
EXAMPLE SCENARIO (in case the description was confusing):
I have a golden chestplate that grants me +10 Max health. I grant myself Instant Health II, which heals me for 8 health, before removing the chestplate; I still technically have 30 health, but now I only have 20 maximum health. Then, I grant myself Instant Health II again, updating my health. It should've just gone down to 20, but, instead, it briefly drops my health to 12 (reduced by 16, twice the amount it should've) before quickly raising it to 20.
If my health were low enough, it would have created the visual glitch.
HOW TO REPRODUCE:
- Equip a piece of armour (or any item) that grants you bonus health.
- Heal yourself to the max: giving yourself Instant Health works.
- Remove the armour piece.
- Grant yourself instant health again.
- You should briefly see your health drop to below max before returning to normal.
MC-19690 Reducing maxHealth / max_health can cause fake death