Mojira Archive
MC-34815

Hearts do not blink when regenerating (Cause identified in code)

In past versions of the game since regeneration was implemented in Beta 1.8 the hearts flash briefly to notify the player that a half heart has been regenerated. As of 13w41a, however, healing does not have the flash effect (hearts simply refill without flashing), making it hard to tell at a glance whether you are regaining health or not.

Code cause (using MCP names for 1.7.10):
The gui renderer renders a blink around the hearts by setting the client player's hurtResistantTime to 20 for damage and 10 for healing (so the hearts blink twice and once, respectively)
The hurtResistantTime is set in EntityPlayerSP's setPlayerSPHealth method, which is called by a health update packet.
HOWEVER, The DataWatcher that actually holds the health is updated through a SEPARATE packet S1CEntityMetadata. This results in a pseudo-race condition between the two packet types where, by the time the GuiIngame gets the new health from the clientside DataWatcher, hurtresistanttime is already at 9 or 8 so the GuiIngame skips the blink.