[GH-ISSUE #6317] Native mods: no client level unload when the server sends the client back to configuration #2050

Closed
opened 2026-11-02 15:51:38 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @arismoko on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6317

Originally assigned to: @breachato on GitHub.

🤖 Filed by Aria's agent swarm, Dyna, not by Aria.

When a server sends the client back to configuration, the client drops its level, but native_client_level_unload (#6201) doesn't fire then.

Where, on main at 0e609939ce:

  • Event::Reconfiguring (crates/horizon-client/src/game/remote.rs:1788) and Event::Reconfigured clear the client's level state for the configuration screen, but neither takes heard_level or fires the hook.
  • Unload fires only from leave_server (remote.rs:1081) or when enter_remote_dimension replaces the level (remote.rs:2084-2088).

So the old level's Unload waits for the next login, where it fires after the new level's Load, or for a disconnect. A mod keeps the old level's state through the configuration screen. A proxy that moves a player between servers takes this path.

Vanilla 26.3: ClientPacketListener.handleConfigurationStart calls Minecraft.clearClientLevel, which drops the level then. The public NeoForge javadoc for LevelEvent.Unload includes the client clearing its level.

Found by reading in the review of #6201. That review's in-game runs with horizon-machine-sample covered joining, dimension changes, respawn, quitting and a lost connection, but not a reconfiguration.

How to test: horizon-machine-sample is the recommended route. Log both client hooks, and send a joined client back to configuration, for example through a proxy's server switch.

Originally created by @arismoko on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6317 Originally assigned to: @breachato on GitHub. > 🤖 Filed by Aria's agent swarm, Dyna, not by Aria. When a server sends the client back to configuration, the client drops its level, but `native_client_level_unload` (#6201) doesn't fire then. **Where, on main at `0e609939ce`:** - `Event::Reconfiguring` (`crates/horizon-client/src/game/remote.rs:1788`) and `Event::Reconfigured` clear the client's level state for the configuration screen, but neither takes `heard_level` or fires the hook. - Unload fires only from `leave_server` (`remote.rs:1081`) or when `enter_remote_dimension` replaces the level (`remote.rs:2084-2088`). So the old level's Unload waits for the next login, where it fires after the new level's Load, or for a disconnect. A mod keeps the old level's state through the configuration screen. A proxy that moves a player between servers takes this path. **Vanilla 26.3:** `ClientPacketListener.handleConfigurationStart` calls `Minecraft.clearClientLevel`, which drops the level then. The public NeoForge javadoc for `LevelEvent.Unload` includes the client clearing its level. **Found by reading** in [the review of #6201](https://github.com/horizon-rust/horizon/pull/6201#pullrequestreview-5729669457). That review's in-game runs with [horizon-machine-sample](https://github.com/arismoko/horizon-machine-sample) covered joining, dimension changes, respawn, quitting and a lost connection, but not a reconfiguration. **How to test:** horizon-machine-sample is the recommended route. Log both client hooks, and send a joined client back to configuration, for example through a proxy's server switch.
Author
Owner

@breachato commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6562858944 --> @breachato commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
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#2050
No description provided.