[PR #4805] [MERGED] Client LevelLoadTracker: the loading screen waits for the server's start and the player's section #5863

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4805
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: parity/U-levelload


📝 Commits (3)

  • d9cbb0f Level loading: the client's LevelLoadTracker state machine
  • 1b99614 test_world_input_capture: follow the level load tracker's PlayerLoaded
  • dd4f612 Merge remote-tracking branch 'hr/main' into parity/U-levelload

📊 Changes

4 files changed (+374 additions, -25 deletions)

View changed files

📝 crates/horizon-client-render/src/level_loading.rs (+236 -0)
📝 crates/horizon-client/src/game.rs (+13 -3)
📝 crates/horizon-client/src/game/remote.rs (+119 -18)
📝 tests/test_world_input_capture.py (+6 -4)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3518

Rows

  • LevelLoadTracker.startClientLoad: partial. Horizon now has the client's load state machine (level_loading::LevelLoadTracker): startClientLoad on login and respawn (enter_remote_dimension), WaitingForServer until the LEVEL_CHUNKS_LOAD_START game event (loadingPacketsReceived), WaitingForPlayerChunk until the player's section is shown (here: its column is lit; skipped for spectators, the dead and a camera outside the build height) or 30 s have passed, ClientLevelReady and the close delay (isLevelReady). tickClientLoad runs each client tick; when the level is ready the screen closes, the tracker is dropped and ServerboundPlayerLoaded is sent (notifyPlayerLoaded), where before it was sent as soon as the column was lit, whatever the server had said. While it runs the LevelLoadingScreen stays up (it used to close when the player was created) with determineLevelLoadingReason's background (nether portal, end portal, else the blurred panorama), and the keys do not move the player.

Not done: on the integrated server the screen also shows the server's chunk status map and progress bar (LevelLoadTracker.statusView, serverProgress, hasProgress); those need the server thread's LevelLoadListener reports sent to the window. The 500 ms close delay of a new world (doWorldLoad) needs the same path; the constant is there.

Vanilla followed

LevelLoadTracker (all states), ClientPacketListener.handleLogin/handleRespawn/startWaitingForNewLevel/determineLevelLoadingReason/handleGameEvent/tick/notifyPlayerLoaded, LevelLoadingScreen.extractBackground.

Tests

level_loading::tracker_tests (state transitions, timeout, special players, close delay, respawn reasons). cargo clippy -p horizon-client-render -p horizon-client --all-targets -D warnings clean. Not run: the game or lan_e2e (CI parity runs after merge).

🤖 Generated with Claude Code


🔄 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/4805 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/U-levelload` --- ### 📝 Commits (3) - [`d9cbb0f`](https://github.com/horizon-rust/horizon/commit/d9cbb0f4e6370c15c1fd0121cfb2c4e1ceb74690) Level loading: the client's LevelLoadTracker state machine - [`1b99614`](https://github.com/horizon-rust/horizon/commit/1b99614b7b0b36e41ee24fda0b85f4bd33b78722) test_world_input_capture: follow the level load tracker's PlayerLoaded - [`dd4f612`](https://github.com/horizon-rust/horizon/commit/dd4f61225b3e230f9497e7d5849ebfe1f8abbb84) Merge remote-tracking branch 'hr/main' into parity/U-levelload ### 📊 Changes **4 files changed** (+374 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/level_loading.rs` (+236 -0) 📝 `crates/horizon-client/src/game.rs` (+13 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+119 -18) 📝 `tests/test_world_input_capture.py` (+6 -4) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3518 ## Rows - `LevelLoadTracker.startClientLoad`: partial. Horizon now has the client's load state machine (`level_loading::LevelLoadTracker`): `startClientLoad` on login and respawn (`enter_remote_dimension`), `WaitingForServer` until the `LEVEL_CHUNKS_LOAD_START` game event (`loadingPacketsReceived`), `WaitingForPlayerChunk` until the player's section is shown (here: its column is lit; skipped for spectators, the dead and a camera outside the build height) or 30 s have passed, `ClientLevelReady` and the close delay (`isLevelReady`). `tickClientLoad` runs each client tick; when the level is ready the screen closes, the tracker is dropped and `ServerboundPlayerLoaded` is sent (`notifyPlayerLoaded`), where before it was sent as soon as the column was lit, whatever the server had said. While it runs the `LevelLoadingScreen` stays up (it used to close when the player was created) with `determineLevelLoadingReason`'s background (nether portal, end portal, else the blurred panorama), and the keys do not move the player. Not done: on the integrated server the screen also shows the server's chunk status map and progress bar (`LevelLoadTracker.statusView`, `serverProgress`, `hasProgress`); those need the server thread's `LevelLoadListener` reports sent to the window. The 500 ms close delay of a new world (`doWorldLoad`) needs the same path; the constant is there. ## Vanilla followed `LevelLoadTracker` (all states), `ClientPacketListener.handleLogin/handleRespawn/startWaitingForNewLevel/determineLevelLoadingReason/handleGameEvent/tick/notifyPlayerLoaded`, `LevelLoadingScreen.extractBackground`. ## Tests `level_loading::tracker_tests` (state transitions, timeout, special players, close delay, respawn reasons). `cargo clippy -p horizon-client-render -p horizon-client --all-targets -D warnings` clean. Not run: the game or lan_e2e (CI parity runs after merge). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:31 +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#5863
No description provided.