[PR #1150] [MERGED] Locator bar: one waypoint manager per level #3096

Closed
opened 2026-11-02 16:01:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1150
Author: @ludovic111
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: fix/locator-bar-per-level


📝 Commits (2)

  • 369179f The locator bar has one waypoint manager per level
  • cc84150 A player leaving a level loses its waypoints there

📊 Changes

5 files changed (+165 additions, -48 deletions)

View changed files

📝 crates/horizon-client/src/game/lan.rs (+4 -3)
📝 crates/horizon-client/src/game/lan_waypoints.rs (+72 -36)
📝 crates/horizon-client/src/lan/waypoints.rs (+50 -1)
📝 tools/test_server_dimension_players_parity.py (+23 -3)
📝 tools/test_server_player_targets_parity.py (+16 -5)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Fixes #843

What

Vanilla keeps a ServerWaypointManager per level: a player in another level is neither a transmitter nor a receiver there. Horizon passed every player to one manager whatever their dimension, so a player who went to the Nether stayed tracked at their Nether coordinates by the players in the Overworld, and nothing was re-tracked when they came back.

  • Each level has its own manager, ticked with the players in that level: a player changing level leaves the old one (untracked for everyone there, as ServerLevel.removePlayerImmediately) and joins the new one (addDuringTeleport).
  • ServerWaypointManager.removePlayer also disconnects every waypoint the leaving player received: each level's manager gets the connections of the players in the other levels for these untracks.

Proof

server_player_targets and server_dimension_players harnesses now compare the waypoints too, as each step leaves them (the last packet per waypoint: arriving in a level, vanilla sends the same waypoint up to three times within the step; packet order stays test_locator_bar_parity's). Both pass: 123 and 40 lines identical. Unit test a_player_leaving_the_level_loses_its_waypoints.

Self-check

All 18 B5 branches merged on one integration commit over origin/main b31cb422 (Mac mini):

cargo fmt --all --check                                                  ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings   exit 0, no ^error
cargo test -p horizon-client                                             1087 passed, 0 failed
python3 tools/parity.py --changed origin/main                            102 passed, 0 failed (over b7390d78)
python3 tools/parity.py --changed-files <explosion.rs>                   22 passed, 0 failed (over b31cb422, after rebasing onto #1101)

tools/lan_e2e.py, full runs over b31cb422 (48 checks):

  • --server-thread: 47 passed; swings (the guest's hoe) failed after earlier checks and passes alone.
  • in-frame: 44 passed. cracks caught a guest's crack left behind when its own tick broke the block (fixed in the cracks PR; swings then cracks and a 3-break probe now pass in both modes). barter (piglin gone), swings and effects fail only after earlier checks and pass alone.
  • sign (not touched here) fails about 1 run in 4, on main too: place reports 2 ticks after the click, sometimes before the server's answer. Noted in FEATURES.md with the other flakes.

🤖 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/1150 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/locator-bar-per-level` --- ### 📝 Commits (2) - [`369179f`](https://github.com/horizon-rust/horizon/commit/369179f331290013a639bcefa42b33776a8bb1e0) The locator bar has one waypoint manager per level - [`cc84150`](https://github.com/horizon-rust/horizon/commit/cc84150f6c75194655a79100fd7baef932dcc8b8) A player leaving a level loses its waypoints there ### 📊 Changes **5 files changed** (+165 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan.rs` (+4 -3) 📝 `crates/horizon-client/src/game/lan_waypoints.rs` (+72 -36) 📝 `crates/horizon-client/src/lan/waypoints.rs` (+50 -1) 📝 `tools/test_server_dimension_players_parity.py` (+23 -3) 📝 `tools/test_server_player_targets_parity.py` (+16 -5) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #843 ## What Vanilla keeps a `ServerWaypointManager` per level: a player in another level is neither a transmitter nor a receiver there. Horizon passed every player to one manager whatever their dimension, so a player who went to the Nether stayed tracked at their Nether coordinates by the players in the Overworld, and nothing was re-tracked when they came back. - Each level has its own manager, ticked with the players in that level: a player changing level leaves the old one (untracked for everyone there, as `ServerLevel.removePlayerImmediately`) and joins the new one (`addDuringTeleport`). - `ServerWaypointManager.removePlayer` also disconnects every waypoint the leaving player received: each level's manager gets the connections of the players in the other levels for these untracks. ## Proof `server_player_targets` and `server_dimension_players` harnesses now compare the waypoints too, as each step leaves them (the last packet per waypoint: arriving in a level, vanilla sends the same waypoint up to three times within the step; packet order stays `test_locator_bar_parity`'s). Both pass: 123 and 40 lines identical. Unit test `a_player_leaving_the_level_loses_its_waypoints`. ### Self-check All 18 B5 branches merged on one integration commit over origin/main `b31cb422` (Mac mini): ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0, no ^error cargo test -p horizon-client 1087 passed, 0 failed python3 tools/parity.py --changed origin/main 102 passed, 0 failed (over b7390d78) python3 tools/parity.py --changed-files <explosion.rs> 22 passed, 0 failed (over b31cb422, after rebasing onto #1101) ``` `tools/lan_e2e.py`, full runs over `b31cb422` (48 checks): - `--server-thread`: 47 passed; `swings` (the guest's hoe) failed after earlier checks and passes alone. - in-frame: 44 passed. `cracks` caught a guest's crack left behind when its own tick broke the block (fixed in the cracks PR; `swings` then `cracks` and a 3-break probe now pass in both modes). `barter` (piglin gone), `swings` and `effects` fail only after earlier checks and pass alone. - `sign` (not touched here) fails about 1 run in 4, on main too: `place` reports 2 ticks after the click, sometimes before the server's answer. Noted in FEATURES.md with the other flakes. 🤖 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-02 16:01:29 +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#3096
No description provided.