mojira.dev
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.

Linked issues

Comments 16

I see this bug too. I confirm.

Also appears on every 1.7 snapshot from the listed one on and in all prereleases + 1.7.2 release. Please update versions space.

Thank you. OCD satisfied.

I've seen this too, and just accidentally created a report of it before I found this one. I confirm

6 more comments

Vincent, can you make a mod for this fix if this isn't fixed soon?

FIXED in 14w31a! YES!

Bug still occurs intermittently in 14w31/32a, heart does not blink and simply refills
Other please test and confirm?

Odd, it shows sometimes and doesn't other times, confirmed. Topic should be reopened and checked again.

Now it blinks twice for each healing. sigh.
Guess that's for another report, I guess.

williewillus

(Unassigned)

Community Consensus

health, heart

Minecraft 13w41a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, ..., Minecraft 14w26c, Minecraft 1.7.10, Minecraft 14w27b, Minecraft 14w29b, Minecraft 14w32a

Minecraft 14w31a, Minecraft 14w32b

Retrieved