[PR #2361] [MERGED] Respawn at once without a death screen when immediate_respawn is on #4241

Closed
opened 2026-11-03 04:15:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2361
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/immediate-respawn


📝 Commits (3)

  • e6587dc Respawn at once without a death screen when immediate_respawn is on
  • 8aad511 Drop the cursor stack when the dead player respawns
  • f010708 Merge main into fix/immediate-respawn

📊 Changes

5 files changed (+103 additions, -50 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+8 -3)
📝 crates/horizon-client/src/game/lan.rs (+2 -0)
📝 crates/horizon-client/src/game/remote.rs (+24 -5)
📝 crates/horizon-client/src/game/screens.rs (+53 -41)
📝 crates/horizon-client/src/lan/hub.rs (+16 -1)

📄 Description

What and why

The immediate_respawn game rule did nothing: the death screen always showed. With the rule on, the player now comes back at once, with no death screen.

  • A server tells its players in the Login packet (show_death_screen is the opposite of the rule) and with the IMMEDIATE_RESPAWN game event when the rule changes.
  • The client keeps that flag, and when the death packet arrives with the screen hidden it asks to respawn instead of opening the death screen.
  • Playing in-frame, the same rule respawns the player straight away.

The respawn steps that the death screen's Respawn button ran are now one function, used by the button and by the immediate respawn.

Vanilla reference

  • PlayerList.placeNewPlayer: ClientboundLoginPacket with !immediateRespawn
  • MinecraftServer.onGameRuleChanged: ClientboundGameEventPacket.IMMEDIATE_RESPAWN
  • ClientPacketListener.handleGameEvent (setShowDeathScreen(param == 0)) and handlePlayerCombatKill (player.respawn() when the death screen is hidden)
  • Gui.setScreen: a dead player with no death screen calls respawn()

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2361 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/immediate-respawn` --- ### 📝 Commits (3) - [`e6587dc`](https://github.com/horizon-rust/horizon/commit/e6587dce6a005413b2617d281826dde4ca6663f0) Respawn at once without a death screen when immediate_respawn is on - [`8aad511`](https://github.com/horizon-rust/horizon/commit/8aad511579676fa39072a685482a9ed3b9a1bacc) Drop the cursor stack when the dead player respawns - [`f010708`](https://github.com/horizon-rust/horizon/commit/f01070810377f7d97321a1e866c52573c133ed8c) Merge main into fix/immediate-respawn ### 📊 Changes **5 files changed** (+103 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+8 -3) 📝 `crates/horizon-client/src/game/lan.rs` (+2 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+24 -5) 📝 `crates/horizon-client/src/game/screens.rs` (+53 -41) 📝 `crates/horizon-client/src/lan/hub.rs` (+16 -1) </details> ### 📄 Description ## What and why The `immediate_respawn` game rule did nothing: the death screen always showed. With the rule on, the player now comes back at once, with no death screen. - A server tells its players in the Login packet (`show_death_screen` is the opposite of the rule) and with the IMMEDIATE_RESPAWN game event when the rule changes. - The client keeps that flag, and when the death packet arrives with the screen hidden it asks to respawn instead of opening the death screen. - Playing in-frame, the same rule respawns the player straight away. The respawn steps that the death screen's Respawn button ran are now one function, used by the button and by the immediate respawn. ## Vanilla reference - `PlayerList.placeNewPlayer`: `ClientboundLoginPacket` with `!immediateRespawn` - `MinecraftServer.onGameRuleChanged`: `ClientboundGameEventPacket.IMMEDIATE_RESPAWN` - `ClientPacketListener.handleGameEvent` (`setShowDeathScreen(param == 0)`) and `handlePlayerCombatKill` (`player.respawn()` when the death screen is hidden) - `Gui.setScreen`: a dead player with no death screen calls `respawn()` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:43 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4241
No description provided.