mojira.dev
MC-228056

Entities turn invisible upon death on the death screen

Entities turn invisible upon the player's death when on the death screen.

Steps to reproduce

  1. Die when you have items in your inventory

  2. See your items explode everywhere

  3. See your items disappear

Linked issues

Attachments

Comments 18

It is similar but this is just on the "You Died!" screen 🙂

Can confirm in 1.17.1.

Can confirm in 1.17.1 as well.

8 more comments

Does the chunk unload and stop ticking on death? I wonder if that’s why this happens. Still a problem on 1.21.5 and 1.21.6 snapshots.

Still in 1.21.8 and 25w33a.

This is caused because of how LivingEntity handles death events. When an entity is killed and finishes their death animation, RemovalReason “KILLED” is called which removes said entity from chunk tracking. While this works for regular entities, players can still see the world on the death screen, and being “removed” as a player causes a ghost world state where all ticks are frozen, entities stop updating, and block updates are ignored.

Discovered a fix:
In ChunkMap, removeEntity calls broadcastRemoved. Simply remove the call to broadcastRemoved for ServerPlayer in the isDeadOrDying state. This fixes the issue without causing respawn issues.

One of the most annoying bugs in my opinion

Brevort

(Unassigned)

Confirmed

Platform

Normal

Entities

death, entity, invisible

1.17, 1.17.1, 21w39a, 21w41a, 22w18a, ..., 1.20.4, 24w09a, 1.21.1, 24w39a, 1.21.4

Retrieved