mojira.dev
MC-73655

Health indicator flashes incorrect number of hearts when the player takes damage quickly

The bug

When you take damage, the hearts you lost are supposed to flash white 3 times. However, If you take damage again while the health bar is still flashing, it will reset the flash animation with the same number of hearts flashing. Instead of there being 2 overlapping animations like there should be, they will be combined into one.

For example, if you take 2 hearts damage, then after 1 flash you take 1 heart damage, what should have happened is that 3 hearts flash twice, then 1 heart flashes once. What really happened is that 3 hearts flashed 3 times.

How to reproduce

To replicate, stand on a cactus. As you take damage, the number of hearts that flash will keep increasing, and will always be equal to your starting health minus your current health.

Linked issues

Attachments

Comments 12

Do the "previous" hearts ever stop blinking? If you continuously take .5 hearts of damage, will your entire health bar be blinking by the end?

Yes that is what happens

Confirmed for 1.10.2.

I haven't delved deep into experimentation, but I cautiously conclude that if damage is taken from two different sources (Such as being punched by a zombie while being pricked by a cactus) that taking damage from one source removes the "blinking" effect from damage from the other source.

Can confirm for 1.11

Confirmed for 18w30b

2 more comments

Confirmed for 18w33a

Confirmed for 1.13.1-pre1

Confirmed in 1.15.2 and 1.16 Pre-release 2.

Can confirm in 20w51a.

Can confirm in 1.17.1 and 21w40a.

marcono1234

(Unassigned)

Confirmed

UI

blinking, damage, heart, hearts, life-bar

Minecraft 1.8.1-pre3, Minecraft 15w37a, Minecraft 1.10.2, Minecraft 1.11, Minecraft 1.13, ..., 1.16 Pre-release 2, 20w51a, 1.17.1, 21w40a, 1.20.2

Retrieved