[PR #4154] [MERGED] Far terrain: the dimension the player is in, not the server's level in place #5446

Closed
opened 2026-11-03 05:12:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4154
Author: @spidercraft
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: far-terrain-nether-respawn


📝 Commits (1)

  • d87ead9 Far terrain: the dimension the player is in, not the server's level in place

📊 Changes

2 files changed (+15 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+2 -1)
📝 crates/horizon-client/src/game/levels.rs (+13 -0)

📄 Description

🤖 Opened by Claude Code.

What and why

Dying in the Nether and respawning in the Overworld could leave Nether far terrain (netherrack walls, lava) standing all around the Overworld until the world was reopened.

The window built its far terrain from whichever level the server thread had in place when it asked (game.streaming.lod_source()). The server ticks its levels in turn, so right after a respawn that could still be the Nether. Levels::lod_source_in(dim) now gives the source of the dimension the player is in, whether that level is in place or parked.

Found while working on the far terrain stack (#4156 and after); independent of it.

Testing

  • The bug depends on timing: dying in the Nether and respawning did not reproduce it reliably here, so this fix is reasoned from the code (game.rs prepare_lod, game/levels.rs) rather than proven by a before/after run.
  • In-frame mode (--in-frame) is unchanged: it never had an integrated server.

pr_ready (tools/pr_ready.py --quick on SpiderPC, against origin/main at 25f9cd3a9, 1 min 43 s)

Check Result
Scope ✅ 2 files, +15 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (26 s)
rustfmt ✅ (5 s)
clippy ✅ (35 s)
tests: horizon-client ✅ 956 passed (36 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)

🤖 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/4154 **Author:** [@spidercraft](https://github.com/spidercraft) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `far-terrain-nether-respawn` --- ### 📝 Commits (1) - [`d87ead9`](https://github.com/horizon-rust/horizon/commit/d87ead957e5ece5b3f2bc658ec66d94d095d7f1a) Far terrain: the dimension the player is in, not the server's level in place ### 📊 Changes **2 files changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+2 -1) 📝 `crates/horizon-client/src/game/levels.rs` (+13 -0) </details> ### 📄 Description > 🤖 Opened by Claude Code. ## What and why Dying in the Nether and respawning in the Overworld could leave **Nether far terrain** (netherrack walls, lava) standing all around the Overworld until the world was reopened. The window built its far terrain from whichever level the server thread had *in place* when it asked (`game.streaming.lod_source()`). The server ticks its levels in turn, so right after a respawn that could still be the Nether. `Levels::lod_source_in(dim)` now gives the source of the dimension the player is in, whether that level is in place or parked. Found while working on the far terrain stack (#4156 and after); independent of it. ## Testing - The bug depends on timing: dying in the Nether and respawning did not reproduce it reliably here, so this fix is reasoned from the code (`game.rs` `prepare_lod`, `game/levels.rs`) rather than proven by a before/after run. - In-frame mode (`--in-frame`) is unchanged: it never had an `integrated` server. **pr_ready** (`tools/pr_ready.py --quick` on SpiderPC, against origin/main at 25f9cd3a9, 1 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +15 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (26 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (35 s) | | tests: horizon-client | ✅ 956 passed (36 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) | 🤖 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 05:12: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#5446
No description provided.