[PR #692] [MERGED] Locator bar for vanilla clients on Horizon servers (waypoint packets as vanilla sends them) #2735

Closed
opened 2026-11-02 15:58:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/locator-bar


📝 Commits (1)

  • 171fbeb Send vanilla clients the locator bar on dedicated and LAN servers

📊 Changes

8 files changed (+1538 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/lan.rs (+7 -0)
➕ crates/horizon-client/src/game/lan_waypoints.rs (+95 -0)
📝 crates/horizon-client/src/lan/mod.rs (+1 -0)
➕ crates/horizon-client/src/lan/waypoints.rs (+643 -0)
📝 crates/horizon-protocol/src/packets/play.rs (+150 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java (+382 -0)
➕ tools/test_locator_bar_parity.py (+259 -0)

📄 Description

Vanilla 26.3 clients on a Horizon server (dedicated or Open to LAN) now get the locator bar: the other players' waypoints, sent the way vanilla's server sends them.

What's ported

  • ServerWaypointManager and the three WaypointTransmitter connections:

    • block: the receiver can see the chunk; an update when the block changes, broken beyond one block (Manhattan);
    • chunk: one chunk outside the receiver's view; broken past one chunk (Chebyshev) or once the chunk is in view;
    • azimuth: more than 332 blocks away; an update when the angle changes by more than half a degree.

    Each connection is remade when it breaks.

  • Who sees whom:

    • a spectator sees everyone, and no one sees a spectator;
    • otherwise the transmit and receive ranges decide, which vanilla sets for players through the waypoint_transmit_range / waypoint_receive_range attributes;
    • crouching (but not while flying), invisibility, and a carved pumpkin or a mob head on the head set the transmit range to 0, as their attribute modifiers do.
  • Colours: the team's colour, or the icon's colour from /waypoint modify.

  • The locator_bar game rule: off breaks every connection; on remakes them.

  • Joining and leaving:

    • a new player is placed at once but connects from their first move (firstTick);
    • a respawn removes and adds the player again, as PlayerList.respawn makes a new ServerPlayer;
    • leaving untracks them.
  • Protocol: ClientboundTrackedWaypointPacket (play 0x8D, waypoint), with a byte-exact codec test.

Harness: tools/test_locator_bar_parity.py

  • A vanilla dedicated server and Horizon's each serve a copy of the same flat world, which vanilla generates once.
  • LocatorBarClient joins two players made of vanilla's own protocol code. It records every waypoint packet each player receives, step by step, through 28 scripted steps:
    • moving one block, three blocks, out of view, one chunk on, really far, turning around, half a degree;
    • invisible and visible again;
    • red team, blue team, no team (console);
    • crouching on the ground and standing up;
    • a carved pumpkin on and off;
    • the game rule off and on;
    • spectator and back;
    • leaving.
  • The transcripts must be identical:
    • every step but the two joins compares exact packets: operation, player, style, colour and block, chunk or angle;
    • the two joins compare what each bar shows at their end. Vanilla's server moves a newly joined player a tiny step on its own first ticks, which tracks them where they spawned; Horizon doesn't simulate its guests' physics.
  • Each player command waits for its feedback, so a slow server still takes every step in its step.

Not covered yet

  • Waypoints are computed once per tick: several moves in one tick give one update.
  • Mobs with a transmit range (set by /attribute) don't show up.
  • Guests can't use /waypoint modify on themselves.
  • Vehicle passengers aren't handled.
  • A guest's team is looked up by name.

Checks

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test -p horizon-client --lib: 807 passed. cargo test -p horizon-protocol: 54 passed.
  • tools/parity.py --changed origin/main (87 harnesses, including the new locator_bar): 87 passed, 0 failed.

🤖 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/692 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/locator-bar` --- ### 📝 Commits (1) - [`171fbeb`](https://github.com/horizon-rust/horizon/commit/171fbeb8ac4877109fc95e93c5db1b0f2360652b) Send vanilla clients the locator bar on dedicated and LAN servers ### 📊 Changes **8 files changed** (+1538 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+7 -0) ➕ `crates/horizon-client/src/game/lan_waypoints.rs` (+95 -0) 📝 `crates/horizon-client/src/lan/mod.rs` (+1 -0) ➕ `crates/horizon-client/src/lan/waypoints.rs` (+643 -0) 📝 `crates/horizon-protocol/src/packets/play.rs` (+150 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java` (+382 -0) ➕ `tools/test_locator_bar_parity.py` (+259 -0) </details> ### 📄 Description Vanilla 26.3 clients on a Horizon server (dedicated or Open to LAN) now get the locator bar: the other players' waypoints, sent the way vanilla's server sends them. **What's ported** - `ServerWaypointManager` and the three `WaypointTransmitter` connections: - **block**: the receiver can see the chunk; an update when the block changes, broken beyond one block (Manhattan); - **chunk**: one chunk outside the receiver's view; broken past one chunk (Chebyshev) or once the chunk is in view; - **azimuth**: more than 332 blocks away; an update when the angle changes by more than half a degree. Each connection is remade when it breaks. - **Who sees whom:** - a spectator sees everyone, and no one sees a spectator; - otherwise the transmit and receive ranges decide, which vanilla sets for players through the `waypoint_transmit_range` / `waypoint_receive_range` attributes; - crouching (but not while flying), invisibility, and a carved pumpkin or a mob head on the head set the transmit range to 0, as their attribute modifiers do. - **Colours:** the team's colour, or the icon's colour from `/waypoint modify`. - **The `locator_bar` game rule:** off breaks every connection; on remakes them. - **Joining and leaving:** - a new player is placed at once but connects from their first move (`firstTick`); - a respawn removes and adds the player again, as `PlayerList.respawn` makes a new `ServerPlayer`; - leaving untracks them. - **Protocol:** `ClientboundTrackedWaypointPacket` (play `0x8D`, `waypoint`), with a byte-exact codec test. **Harness: `tools/test_locator_bar_parity.py`** - A vanilla dedicated server and Horizon's each serve a copy of the same flat world, which vanilla generates once. - `LocatorBarClient` joins two players made of vanilla's own protocol code. It records every waypoint packet each player receives, step by step, through 28 scripted steps: - moving one block, three blocks, out of view, one chunk on, really far, turning around, half a degree; - invisible and visible again; - red team, blue team, no team (console); - crouching on the ground and standing up; - a carved pumpkin on and off; - the game rule off and on; - spectator and back; - leaving. - The transcripts must be identical: - **every step but the two joins** compares exact packets: operation, player, style, colour and block, chunk or angle; - **the two joins** compare what each bar shows at their end. Vanilla's server moves a newly joined player a tiny step on its own first ticks, which tracks them where they spawned; Horizon doesn't simulate its guests' physics. - Each player command waits for its feedback, so a slow server still takes every step in its step. **Not covered yet** - Waypoints are computed once per tick: several moves in one tick give one update. - Mobs with a transmit range (set by `/attribute`) don't show up. - Guests can't use `/waypoint modify` on themselves. - Vehicle passengers aren't handled. - A guest's team is looked up by name. **Checks** - `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`: clean. - `cargo test -p horizon-client --lib`: 807 passed. `cargo test -p horizon-protocol`: 54 passed. - `tools/parity.py --changed origin/main` (87 harnesses, including the new `locator_bar`): **87 passed, 0 failed**. 🤖 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 15:58:39 +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#2735
No description provided.