[PR #5143] [MERGED] Clear waypoints when the server reconfigures the client #6097

Closed
opened 2026-11-03 06:11:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5143
Author: @arbelonson-source
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/locator-bar-reconfigure


📝 Commits (1)

  • da62023 Clear waypoints when the server reconfigures the client

📊 Changes

1 file changed (+4 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+4 -2)

📄 Description

🤖 Opened by arbelonson-source's AI agent (Claude Code, Claude Opus 5.5), not by arbelonson-source personally.

What and why

Refs #4760. The client now forgets its waypoints when the server reconfigures it, the same way vanilla does.

On a reconfiguration, vanilla's ClientConfigurationPacketListenerImpl.handleConfigurationFinished builds a new ClientPacketListener, and its constructor makes a new, empty ClientWaypointManager. The waypoints the last server tracked go away with the old listener. Horizon's Event::Reconfigured handler in game/remote.rs already resets the HUD players and the scoreboard for the same reason, but it kept self.waypoints. So after a proxy moves the player from a server with the locator bar on to one where locator_bar is off, the new server never sends anything (it has no connections to break), and the old dots stay on the bar for the rest of the session.

This is my best reading of #4760, not a confirmed reproduction. On a single server, Horizon's server side already follows ServerWaypointManager: turning the rule off calls breakAllConnections and the client gets an untrack for each waypoint. I could not find another way for the bar to stay up with the rule off, but if the reporter was not behind a proxy, this may not be their case, and I'm happy to keep looking.

The change is one call to the existing clear_waypoints().

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

  • net.minecraft.client.multiplayer.ClientConfigurationPacketListenerImpl.handleConfigurationFinished: makes the new ClientPacketListener and switches the connection to it.
  • net.minecraft.client.multiplayer.ClientPacketListener.<init>: this.waypointManager = new ClientWaypointManager().
  • net.minecraft.server.waypoints.ServerWaypointManager.breakAllConnections / isLocatorBarEnabledFor: the single-server path, which Horizon already matches.

Checked with javap -c -p on the 26.3 client and server jars. No harness covers the client's reconfiguration handler.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on shrekswamp, against upstream/main at bd541458c, 4 min 57 s)

Check Result
Scope ✅ 1 files, +4 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (41 s)
rustfmt ✅ (9 s)
Rust ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (2 min 13 s)
tests: horizon-client ✅ 1340 passed (1 min 52 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Arbel has some unused personal company AI credits and decided to put them toward repos he wants to support. He plays Horizon himself. The code was written by Claude Opus 5.5 in Claude Code and has not been reviewed by a human.

🤖 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/5143 **Author:** [@arbelonson-source](https://github.com/arbelonson-source) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/locator-bar-reconfigure` --- ### 📝 Commits (1) - [`da62023`](https://github.com/horizon-rust/horizon/commit/da62023123cc88c74ef60374d3434fa0b025c79f) Clear waypoints when the server reconfigures the client ### 📊 Changes **1 file changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+4 -2) </details> ### 📄 Description > 🤖 Opened by arbelonson-source's AI agent (Claude Code, Claude Opus 5.5), not by arbelonson-source personally. ## What and why Refs #4760. The client now forgets its waypoints when the server reconfigures it, the same way vanilla does. On a reconfiguration, vanilla's `ClientConfigurationPacketListenerImpl.handleConfigurationFinished` builds a new `ClientPacketListener`, and its constructor makes a new, empty `ClientWaypointManager`. The waypoints the last server tracked go away with the old listener. Horizon's `Event::Reconfigured` handler in `game/remote.rs` already resets the HUD players and the scoreboard for the same reason, but it kept `self.waypoints`. So after a proxy moves the player from a server with the locator bar on to one where `locator_bar` is off, the new server never sends anything (it has no connections to break), and the old dots stay on the bar for the rest of the session. This is my best reading of #4760, not a confirmed reproduction. On a single server, Horizon's server side already follows `ServerWaypointManager`: turning the rule off calls `breakAllConnections` and the client gets an untrack for each waypoint. I could not find another way for the bar to stay up with the rule off, but if the reporter was not behind a proxy, this may not be their case, and I'm happy to keep looking. The change is one call to the existing `clear_waypoints()`. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference - `net.minecraft.client.multiplayer.ClientConfigurationPacketListenerImpl.handleConfigurationFinished`: makes the new `ClientPacketListener` and switches the connection to it. - `net.minecraft.client.multiplayer.ClientPacketListener.<init>`: `this.waypointManager = new ClientWaypointManager()`. - `net.minecraft.server.waypoints.ServerWaypointManager.breakAllConnections` / `isLocatorBarEnabledFor`: the single-server path, which Horizon already matches. Checked with `javap -c -p` on the 26.3 client and server jars. No harness covers the client's reconfiguration handler. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on shrekswamp, against upstream/main at bd541458c, 4 min 57 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +4 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (41 s) | | rustfmt | ✅ (9 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (2 min 13 s) | | tests: horizon-client | ✅ 1340 passed (1 min 52 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- Arbel has some unused personal company AI credits and decided to put them toward repos he wants to support. He plays Horizon himself. The code was written by Claude Opus 5.5 in Claude Code and has not been reviewed by a human. 🤖 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 06:11:37 +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#6097
No description provided.