The bug
When you set the attribute minecraft:generic.max_health
value to 0
and die, you have an infinite death loop. So you immediately die after respawning every time.
How to reproduce
Run this command:
/attribute @s minecraft:generic.max_health base set 0
Die
Respawn
You will immediately die after respawning and have an infinite death loop. If you relog you are no longer in infinite death loop and your max health will be as it was before.
Linked issues
is duplicated by 3
relates to 2
Attachments
Comments 4
Possible fixes:
Disallow setting health to 0 (makes sense to me); OR
Setting health to 0 is equivalent to
/kill
, but Players will respawn with attributes reset (so death-loop requires an old-school command block loop).
Crazy how if you change doImmediateRespawn gamerule to true, you get to look around in the same spot with a slightly tilted camera.
also if you have doimmediaterespawn on true, then you go into a weird limbo state where you can still interact with most things, and cannot move, exept for the first second after you die, mobs still detect you and hit you even though it seems you don't have a hitbox (not shown in f5 & f3 + b), you can use commands, you can still place blocks and throw things but they will go in the direction you were looking when you respawned, or the last time you got teleported by /tp, when ever you take damage you die again, you cant eat things or use riptide tridents but can use crossbows. I'm not going to list all of the details, but all you have to do is the same thing there, but doimmediaterespawn has to be true. i will also note that you will go back to normal by relogging