mojira.dev
MCPE-56836

Golden hearts upon taking damage

After attempting a speedrun, a silverfish hit me which didn't give me damage, but instead gave me a single golden heart. I was so surprised I didn't fight back the silverfish afterwards. This only happened on the first hit. I looked at the history of this bug, but there hasn't been many recent reports. It seemed like the silverfish hit me midair while I was falling, which might have played an effect on this. I wish I had a recording. I wasn't wearing armor, nor had previous damage taken from me (full health). 

Linked issues

BDS-1074 Golden hearts Resolved MCPE-44499 Random Golden hearts upon respawning Resolved MCPE-49699 Random Absorption hearts Resolved MCPE-53563 Bonus hearths Resolved MCPE-54220 Upon receiving more of the death damage Minecraft grants you absorption in Bedrock Edition and pocket edition. Resolved

Attachments

Comments 10

Looks to me like MCPE-61213 is a duplicate report. Based on the video in that report and the video attached to this report by tryashtar it appears that the golden hearts occur in one of two circumstances: (1) when hit while in the air (possibly due to knockback) or moving either up or down in the air, or (2) when hit during the damage immunity time. I think (2) is more likely. Therefore, I suspect that in the case of the silverfish described in this report, the player was actually hit by 2 silverfish in close succession, or else he was hit by something else and didn't mention it.

I further suspect that this is an effect of the formula being used to calculate total damage during the damage immunity period. According to the wiki, if a player is hit by a second, stronger attack during the damage immunity period, the total damage during that period will be the damage of the stronger attack. This means that in order to apply the correct damage, the game must find the difference in damage between the first attack and the second, stronger attack, and add that amount of damage. What appears to happen in the two video examples is that a stronger first attack is followed by a weaker second attack. In this case the game applies the same formula to add damage from the second attack, but the calculation returns in a negative number because the second attack is weaker. That negative damage value then gets handled by the game as saturation health or "golden hearts."

To illustrate:

  1. 4 dmg attack followed by 7 dmg attack

    1. Apply 4 dmg

    2. Determine 7 - 4 = 3 additional dmg during the damage immunity time

    3. Apply 3 additional dmg

  2. 7 dmg attack followed by 4 dmg attack

    1. Apply 7 dmg

    2. 4 - 7 = -3 additional dmg during the damage immunity time

    3. Apply -3 additional dmg as +3 saturation health

If this is indeed what is happening, then to fix it you need to put the procedure for calculating additional damage during damage immunity into a conditional that checks whether attacks during that time deal more damage than the first attack.

That's broken. if i stab you and then punch you, that punch should not heal you at all :C

In order to reproduce this bug, I believe you need to be hit by 2 different damage sources at the exact same time (the same tick or 1/20th of a second). I tried to reproduce this by using dispensers with spawn eggs to spawn different monsters to hit me, and I could not reproduce it that way. However, if you look at the videos uploaded on MCPE-44499, the player is hit by projectile + lightning at once in one video, and by projectile + instant damage a once in the other video. The absorption hearts many players reported in connection with blazes in MCPE-19535 were also occurring in a situation where they received multiple hits all at once.

i posted a video on my duplicate ticket MCPE-99648

this happens when you have feather falling enchantment and absorbtion

Although I haven't tested recently, I remember specifically testing with a friend to recreate this bug. We managed to find that we could consistently recreate this by:

Player A jumps from ~10 blocks and Player B punches Player A before he hits the ground. The result is saturation health. I'm not sure, however, if this applies to GoldenHelmet's damage immunity time explanation, mainly because I recieved the saturation hearts before I hit the ground. I'll test tomorrow though, and I'll post my results.

I found a way to get this pretty consistently. When you pearl an endermite, this also happens. I linked a photo and video of this happening.

Hi, I had the same thing happen and I didn't understand what happened.  I was working at height about 60ish up, and was suddenly hit by something I think a zombie.  I expected to die, did not have an apple, did not have the totem.  I am in; Bedrock, win 10, survival, no cheats, multi (rarely).  I didn't die and gained an extra row with one empty heart and at the end of my normal heart row I had a golden heart and all others were full.  I did have feather falling IV.  I didn't die, nor received the damage I should have done.  When the golden heart and extra row with one heart left I had one empty heart remaining which wouldn't fill up despite eating.  It eventually came back when I closed out and re-entered.  this happened on 11.03.21

Probably fixed in 1.17.0.56 Beta (MCPE-94178).

cZar Void

(Unassigned)

375018

Community Consensus

Multiple

1.16.220, 1.16.220.50 Beta, 1.16.210.58 Beta, 1.16.210.55 Beta, 1.16.210.54 Beta, ..., 1.16.10, 1.16.21, 1.16.40 Hotfix, 1.16.201 Hotfix, 1.16.210

1.17.0

Retrieved