[PR #3161] [MERGED] Keep the block outline while a screen is open #4825

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3161
Author: @jaszkus
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/block-outline-open-screens


📝 Commits (1)

  • ddd1dbd Keep the block outline while a screen is open

📊 Changes

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

View changed files

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

📄 Description

🤖 Opened by jaszkus's AI agent, not by jaszkus himself.

What and why

Opening chat made the block outline disappear. Vanilla keeps it: the outline rule does not look at the open screen, and the client keeps raycasting the block under the crosshair while chat is up. Game::render additionally required Screen::Playing, so Screen::Chat produced an empty Frame::outline.

This drops that screen check. The F1 (!ui.hide_gui) and game-mode (may_build, adventure/spectator) rules stay as they were. It also restores the outline behind the inventory, the pause menu and the other in-game screens, which vanilla draws it behind too.

I could not find an existing issue for this after searching open and closed issues and pull requests (outline, block outline, chat outline); the only outline issues were about ice (#563) and the dragon/glowing effect (#2014).

Note: #2990 touches the same let outline = ... line for adventure can_break / can_place_on; whichever lands second needs the screen == Screen::Playing term dropped from the other.

Vanilla reference

  • net.minecraft.client.renderer.GameRenderer.shouldRenderBlockOutline() (GameRenderer.java:604-629): !minecraft.gui.hud.isHidden() plus the mayBuild / adventure / spectator branches; no screen check.
  • net.minecraft.client.Minecraft.tick() (Minecraft.java:1769-1792): this.pick(1.0F) runs before gui.tick(), so hitResult stays current while chat is open.
  • net.minecraft.client.gui.screens.ChatScreen.isPauseScreen() returns false (ChatScreen.java:290-292), so the level keeps ticking behind it.
  • net.minecraft.client.renderer.extract.LevelExtractor.extractBlockOutline() (LevelExtractor.java:385-410) and LevelRenderer.submitBlockOutline() (LevelRenderer.java:1073-1088): no screen check.
  • GameRenderer.setRenderBlockOutline(false) is only used while the panorama screenshot runs (Minecraft.java:2780, back to true at 2843).

There is no block-outline harness today; #2518 (the F1/adventure rules) also had none. CI's parity job can run whatever it selects; the change is a visibility rule, so I checked it against the decompiled 26.3 sources.

Self-check

pr_ready (tools/pr_ready.py --quick on DESKTOP-32UL5CT, against origin/main at b6c936f82, 57 min 25 s)

Check Result
Scope ✅ 1 files, +3 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 398 run, FAILED (failures=2, errors=8, skipped=11) (6 min 8 s)
rustfmt ✅ (50 s)
clippy ✅ (9 min 49 s)
tests: horizon-client ❌ failed (31 min 40 s)
doc tests ✅ 0 passed (8 min 52 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)

🔄 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/3161 **Author:** [@jaszkus](https://github.com/jaszkus) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/block-outline-open-screens` --- ### 📝 Commits (1) - [`ddd1dbd`](https://github.com/horizon-rust/horizon/commit/ddd1dbdf91495db5bbecaa0e34dfd293039d58e4) Keep the block outline while a screen is open ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -2) </details> ### 📄 Description > 🤖 Opened by jaszkus's AI agent, not by jaszkus himself. ## What and why Opening chat made the block outline disappear. Vanilla keeps it: the outline rule does not look at the open screen, and the client keeps raycasting the block under the crosshair while chat is up. `Game::render` additionally required `Screen::Playing`, so `Screen::Chat` produced an empty `Frame::outline`. This drops that screen check. The F1 (`!ui.hide_gui`) and game-mode (`may_build`, adventure/spectator) rules stay as they were. It also restores the outline behind the inventory, the pause menu and the other in-game screens, which vanilla draws it behind too. I could not find an existing issue for this after searching open and closed issues and pull requests (`outline`, `block outline`, `chat outline`); the only outline issues were about ice (#563) and the dragon/glowing effect (#2014). Note: #2990 touches the same `let outline = ...` line for adventure `can_break` / `can_place_on`; whichever lands second needs the `screen == Screen::Playing` term dropped from the other. ## Vanilla reference - `net.minecraft.client.renderer.GameRenderer.shouldRenderBlockOutline()` (`GameRenderer.java:604-629`): `!minecraft.gui.hud.isHidden()` plus the `mayBuild` / adventure / spectator branches; no screen check. - `net.minecraft.client.Minecraft.tick()` (`Minecraft.java:1769-1792`): `this.pick(1.0F)` runs before `gui.tick()`, so `hitResult` stays current while chat is open. - `net.minecraft.client.gui.screens.ChatScreen.isPauseScreen()` returns false (`ChatScreen.java:290-292`), so the level keeps ticking behind it. - `net.minecraft.client.renderer.extract.LevelExtractor.extractBlockOutline()` (`LevelExtractor.java:385-410`) and `LevelRenderer.submitBlockOutline()` (`LevelRenderer.java:1073-1088`): no screen check. - `GameRenderer.setRenderBlockOutline(false)` is only used while the panorama screenshot runs (`Minecraft.java:2780`, back to `true` at 2843). There is no block-outline harness today; #2518 (the F1/adventure rules) also had none. CI's parity job can run whatever it selects; the change is a visibility rule, so I checked it against the decompiled 26.3 sources. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DESKTOP-32UL5CT, against origin/main at b6c936f82, 57 min 25 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 398 run, FAILED (failures=2, errors=8, skipped=11) (6 min 8 s) | | rustfmt | ✅ (50 s) | | clippy | ✅ (9 min 49 s) | | tests: horizon-client | ❌ failed (31 min 40 s) | | doc tests | ✅ 0 passed (8 min 52 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) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:14 +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#4825
No description provided.