[PR #2061] [MERGED] Reset boss overlay on server reconfiguration #3975

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2061
Author: @lazy-importer
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/2034-bossbar-vanish-reconfigure


📝 Commits (1)

  • c675329 Reset boss overlay on server reconfiguration

📊 Changes

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

View changed files

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

📄 Description

🤖 Opened by lazy-importer's AI agent (Claude), not by lazy-importer himself.

Fixes #2034.

What changed

When transferring or switching sub-servers on proxy networks such as Velocity or BungeeCord (e.g. on Minehut or multi-lobby servers), the network thread transitions back into configuration mode and sends Event::Reconfigured to Game.

In vanilla Java Edition (ClientPacketListener.handleConfigurationStart), entering configuration mode calls:

this.minecraft.clearClientLevel(new ServerReconfigScreen(...));

which in turn calls this.gui.hud.onDisconnected(), resetting the boss overlay (this.bossOverlay.reset(), which clears all active boss event UUIDs).

Previously, Horizon only called self.set_registries(registries) upon receiving Event::Reconfigured. As a result, bossbars tracked from the previous server remained active and displayed on screen indefinitely.

We now call self.boss_overlay.reset() in Event::Reconfigured before updating registries, ensuring previous bossbars vanish cleanly during proxy transitions.

Parity reference

  • Decompiled vanilla bytecode: net.minecraft.client.multiplayer.ClientPacketListener.handleConfigurationStart -> clearClientLevel -> Hud.onDisconnected -> BossHealthOverlay.reset (this.events.clear()).

Self-check

  • Code formatted with cargo fmt
  • Tested with isolated temp homes (HORIZON_HOME, HORIZON_LAUNCHER_HOME)
  • Unit tests for boss_overlay pass (cargo test -p horizon-client --lib boss_overlay)
  • Verified in game on proxy network

🤖 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/2061 **Author:** [@lazy-importer](https://github.com/lazy-importer) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2034-bossbar-vanish-reconfigure` --- ### 📝 Commits (1) - [`c675329`](https://github.com/horizon-rust/horizon/commit/c6753292083086c303e8697ea0ae520987f50906) Reset boss overlay on server reconfiguration ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+4 -1) </details> ### 📄 Description > 🤖 Opened by lazy-importer's AI agent (Claude), not by lazy-importer himself. Fixes #2034. ### What changed When transferring or switching sub-servers on proxy networks such as Velocity or BungeeCord (e.g. on Minehut or multi-lobby servers), the network thread transitions back into configuration mode and sends `Event::Reconfigured` to `Game`. In vanilla Java Edition (`ClientPacketListener.handleConfigurationStart`), entering configuration mode calls: ```java this.minecraft.clearClientLevel(new ServerReconfigScreen(...)); ``` which in turn calls `this.gui.hud.onDisconnected()`, resetting the boss overlay (`this.bossOverlay.reset()`, which clears all active boss event UUIDs). Previously, Horizon only called `self.set_registries(registries)` upon receiving `Event::Reconfigured`. As a result, bossbars tracked from the previous server remained active and displayed on screen indefinitely. We now call `self.boss_overlay.reset()` in `Event::Reconfigured` before updating registries, ensuring previous bossbars vanish cleanly during proxy transitions. ### Parity reference - Decompiled vanilla bytecode: `net.minecraft.client.multiplayer.ClientPacketListener.handleConfigurationStart` -> `clearClientLevel` -> `Hud.onDisconnected` -> `BossHealthOverlay.reset` (`this.events.clear()`). ### Self-check - [x] Code formatted with `cargo fmt` - [x] Tested with isolated temp homes (`HORIZON_HOME`, `HORIZON_LAUNCHER_HOME`) - [x] Unit tests for `boss_overlay` pass (`cargo test -p horizon-client --lib boss_overlay`) - [x] Verified in game on proxy network 🤖 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 04:13: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#3975
No description provided.