mojira.dev
MC-184232

Players with modified Health attribute falsely die

When players have modified health attributes and take damage, they can falsely die.
The player will see a respawn screen, despite still having health available.
The issue is only perceived client-side, players in a server environment will not see that this has happened to another player; And reloading your world, or re-logging into a server will resolve the issue.

The most reliable way to reproduce this is to set a players max health to a low value (/attribute @s minecraft:generic.max_health base set 6) and then splash the player with the poison effect (though I see this issue occur seemingly unpredictably with many other deaths, while the players health attribute is modified to a low value)

As attached (first.png), player still has available health after being splashed with poison, but they see the respawn screen as if they have died

then when they click respawn, they do not teleport to their spawn point, they do not lose their items, they just resume where they were (second.png)

if the player looks at themselves in third-person or in the inventory, their player model is flickering red and leaning on an angle, as if they are dying (third.png)

This issue seems to be caused by the players health bar not updating when the max health attribute is modified. Despite only having 3 available hearts in this scenario, the player still has 10 hearts worth of life. If the player takes any damage first (i.e. punched by another player) and is then splashed by poison, this bug will not occur, because their health is updated to their max health value after they take damage

Suggested solution: Update the players current health to match their max health value when it is modified.

To my knowledge, this bug has existed since at least 1.12, as seen hereΒ https://www.youtube.com/watch?v=yW3bkIgWHwY

Attachments

Comments 1

Thank you for your report!
We're actually already tracking this issue in MC-19690, so I resolved and linked this ticket as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Community Support – πŸ“§ Customer Support – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

Scott Gamble

(Unassigned)

Unconfirmed

(Unassigned)

20w20b

Retrieved