66d187ed06
A vanilla 26.3 client that died on a Horizon server stayed on its loading screen after pressing Respawn (#566): ClientPacketListener.handleRespawn starts a LevelLoadTracker that waits for the level info's "level chunks load start" game event and the chunk under the player, and Horizon's respawn sent neither the level info nor the chunk cache centre. The hub's respawn now follows PlayerList.respawn: the entities paired with the dead player are removed (one packet each), its chunks are dropped without ForgetLevelChunk (as PlayerChunkSender does for a dead player) and sent again, the abilities, then Respawn (with the last death location), the teleport to the spawn facing its direction, the default spawn, difficulty, experience, post effects, the level info, the permission level, the chunk cache centre and the inventory. A dying guest also gets the death animation event and no health update while dead, as vanilla's ServerPlayer.die does. Guests' commands also ran at the host's permission level: an operator on a dedicated server could not run operator commands (and LAN guests ran the host's level). They now run at the guest's own level, as the command tree they are sent says. The dedicated server harness covers it: after trading, the vanilla-codec client is made an operator by the console, runs /kill, respawns, and the packets from the death screen to the respawned inventory are compared with vanilla's, then the level must load where it respawned. The client also stops sending a movement packet beside each teleport acceptance during the respawn: the 26.3 client sends the acceptance alone, and vanilla's server kicks a second position in the same tick. Fixes #566 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>