[PR #2518] [MERGED] Follow vanilla's block outline rules: high contrast, F1 and adventure #4388

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2518
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/block-outline-rules


📝 Commits (1)

  • b3e1542 Follow vanilla's block outline rules: high contrast option, F1 and adventure

📊 Changes

3 files changed (+68 additions, -21 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -1)
📝 crates/horizon-client/src/gfx.rs (+52 -15)
📝 crates/horizon-client/src/terrain.wgsl (+9 -5)

📄 Description

What and why

  • High Contrast Block Outline now works. The option was only a checkbox. With it on, the block outline is a thick black stroke (7 px) with a bright cyan stroke on top. With it off, the outline is the same as before.
  • F1 now hides the block outline together with the rest of the HUD.
  • Adventure mode: the outline is no longer drawn on every block. Vanilla only shows it when the held item has CAN_BREAK or CAN_PLACE_ON for the target block. Horizon does not read those item components and adventure players cannot break or place at all, so the outline is simply never drawn there.
  • Spectator: unchanged (no outline). Vanilla shows one on blocks with a menu, but Horizon spectators cannot open menus yet, so an outline would promise something that does not work.

The line shader now takes colour and pixel width per line, in the same layout as the gizmo lines, instead of one fixed colour and one width for the frame.

Vanilla reference

  • LevelRenderer.submitBlockOutline: secondary outline -16777216 at width 7.0, then the main one with -11010079 when high contrast is on, otherwise ARGB.black(102).
  • GameRenderer.shouldRenderBlockOutline: !hud.isHidden(), then the mayBuild / adventure / spectator rules.

Self-check

cargo check -p horizon-client passes.


🔄 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/2518 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/block-outline-rules` --- ### 📝 Commits (1) - [`b3e1542`](https://github.com/horizon-rust/horizon/commit/b3e1542e09d26508febc2e577b428ed805785c99) Follow vanilla's block outline rules: high contrast option, F1 and adventure ### 📊 Changes **3 files changed** (+68 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -1) 📝 `crates/horizon-client/src/gfx.rs` (+52 -15) 📝 `crates/horizon-client/src/terrain.wgsl` (+9 -5) </details> ### 📄 Description ## What and why - **High Contrast Block Outline** now works. The option was only a checkbox. With it on, the block outline is a thick black stroke (7 px) with a bright cyan stroke on top. With it off, the outline is the same as before. - **F1** now hides the block outline together with the rest of the HUD. - **Adventure mode**: the outline is no longer drawn on every block. Vanilla only shows it when the held item has CAN_BREAK or CAN_PLACE_ON for the target block. Horizon does not read those item components and adventure players cannot break or place at all, so the outline is simply never drawn there. - **Spectator**: unchanged (no outline). Vanilla shows one on blocks with a menu, but Horizon spectators cannot open menus yet, so an outline would promise something that does not work. The line shader now takes colour and pixel width per line, in the same layout as the gizmo lines, instead of one fixed colour and one width for the frame. ## Vanilla reference - `LevelRenderer.submitBlockOutline`: secondary outline `-16777216` at width `7.0`, then the main one with `-11010079` when high contrast is on, otherwise `ARGB.black(102)`. - `GameRenderer.shouldRenderBlockOutline`: `!hud.isHidden()`, then the `mayBuild` / adventure / spectator rules. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:48 +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#4388
No description provided.