[PR #5607] [MERGED] The F3 crosshair goes away with the world #6385

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5607
Author: @1038april
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/debug-crosshair-after-leaving-world


📝 Commits (1)

  • 221eb81 The F3 crosshair goes away with the world

📊 Changes

1 file changed (+32 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+32 -5)

📄 Description

🤖 Opened by 1038april's AI agent (Claude Code, Claude Opus 5.5), not by 1038april personally.

What and why

Fixes #5604

With F3 on, leaving a world kept the debug crosshair's axes on the title screen, off-centre over the panorama. The F3 overlay stays on when a world closes, and render built the crosshair without checking whether the frame showed a level.

The crosshair is now skipped on any frame that shows the panorama. That check moved into shows_panorama, the same condition render already used to pick the panorama, so it also covers the two loading screens that draw it. F3 stays on, so the crosshair comes back in the next world.

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

Checked in the 26.3 bytecode with javap. GameRenderer.extract sets GameRenderState.shouldRenderLevel only when Minecraft.level is non-null, and GameRenderer.render calls renderLevel (which calls render3dHud, which draws DebugCrosshairRenderer) only when it is set.

No parity harness. There is a unit test for the condition, and I ran the steps below in a real game. 1038april also tried the fixed build and confirmed the axes are gone.

Steps: open a world, press F3, press Esc and click Save and Quit to Title. Reopening the world with F3 still on showed the crosshair again. Not run: leaving a multiplayer server and the two loading screens, which go through the same check.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on KernelOS-PC, against upstream/main at d0ce8fa54)

Check Result
Scope ✅ 2 files, +33 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 510 passed (55 s)
rustfmt ✅ (9 s)
clippy ✅ (10 s)
tests: horizon-client ✅ 1575 passed (3 min 33 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)

The Scope row counts an untracked local file. The commit changes only crates/horizon-client/src/game.rs.

🤖 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/5607 **Author:** [@1038april](https://github.com/1038april) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/debug-crosshair-after-leaving-world` --- ### 📝 Commits (1) - [`221eb81`](https://github.com/horizon-rust/horizon/commit/221eb8123ddc7659f31c2a8eb84fdabaaada5dd7) The F3 crosshair goes away with the world ### 📊 Changes **1 file changed** (+32 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+32 -5) </details> ### 📄 Description > 🤖 Opened by 1038april's AI agent (Claude Code, Claude Opus 5.5), not by 1038april personally. ## What and why Fixes #5604 With F3 on, leaving a world kept the debug crosshair's axes on the title screen, off-centre over the panorama. The F3 overlay stays on when a world closes, and `render` built the crosshair without checking whether the frame showed a level. The crosshair is now skipped on any frame that shows the panorama. That check moved into `shows_panorama`, the same condition `render` already used to pick the panorama, so it also covers the two loading screens that draw it. F3 stays on, so the crosshair comes back in the next world. ## 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 Checked in the 26.3 bytecode with `javap`. `GameRenderer.extract` sets `GameRenderState.shouldRenderLevel` only when `Minecraft.level` is non-null, and `GameRenderer.render` calls `renderLevel` (which calls `render3dHud`, which draws `DebugCrosshairRenderer`) only when it is set. No parity harness. There is a unit test for the condition, and I ran the steps below in a real game. 1038april also tried the fixed build and confirmed the axes are gone. **Steps:** open a world, press F3, press Esc and click Save and Quit to Title. Reopening the world with F3 still on showed the crosshair again. Not run: leaving a multiplayer server and the two loading screens, which go through the same check. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on KernelOS-PC, against upstream/main at d0ce8fa54) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +33 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (55 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (10 s) | | tests: horizon-client | ✅ 1575 passed (3 min 33 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) | The Scope row counts an untracked local file. The commit changes only `crates/horizon-client/src/game.rs`. 🤖 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:19:45 +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#6385
No description provided.