[PR #4712] [MERGED] Structure block: bounding box and invisible block markers #5799

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4712
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/A2-bounding-box


📝 Commits (2)

  • 1604f8a BlockEntityWithBoundingBoxRenderer: the structure block's box and invisible-block markers
  • e694791 Merge remote-tracking branch 'hr/main' into parity/A2-bounding-box

📊 Changes

4 files changed (+189 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -6)
📝 crates/horizon-client/src/game/debug_keys.rs (+2 -1)
📝 crates/horizon-client/src/game/structure_blocks.rs (+59 -1)
📝 crates/horizon-client/src/gizmos.rs (+125 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3519 (stage 2 of the structure/jigsaw/test block project: the bounding-box renderer).

What and why

A structure block showed no box in the world, so the area it saves or loads could not be seen. Game masters (and spectators) now see it, drawn with gizmos on top of the world.

  • BlockEntityWithBoundingBoxRenderer.extractRenderState / .extract: visible for canUseGameMasterBlocks or spectator players within the 96-block view distance, using the structure block's renderMode and getRenderableBox.
  • BlockEntityWithBoundingBoxRenderer.submit: the box in vanilla's light grey (0xFFE5E5E5).
  • BlockEntityWithBoundingBoxRenderer.renderInvisibleBlocks: the small cubes for the air (0.4..0.6, blue), barrier (red), light (yellow) and structure void (pink) cells inside the box in SAVE mode with show-air, with vanilla's colours and sizes.

renderStructureVoids is dead code in 26.3 (submit never calls it and structureVoids is always null), so it is not ported.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

BlockEntityWithBoundingBoxRenderer.extractRenderState/extract/submit/renderInvisibleBlocks, BoundingBoxRenderState.

Tests

gizmos tests for the cube sizes, colours and the cell index order. fmt and clippy -D warnings clean on horizon-client.

🤖 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/4712 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/A2-bounding-box` --- ### 📝 Commits (2) - [`1604f8a`](https://github.com/horizon-rust/horizon/commit/1604f8abee8dd79e9eb30f52eaca8a25cfa73434) BlockEntityWithBoundingBoxRenderer: the structure block's box and invisible-block markers - [`e694791`](https://github.com/horizon-rust/horizon/commit/e694791bb52ae1dfe577a3bc123d866dd092d547) Merge remote-tracking branch 'hr/main' into parity/A2-bounding-box ### 📊 Changes **4 files changed** (+189 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -6) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+2 -1) 📝 `crates/horizon-client/src/game/structure_blocks.rs` (+59 -1) 📝 `crates/horizon-client/src/gizmos.rs` (+125 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3519 (stage 2 of the structure/jigsaw/test block project: the bounding-box renderer). ## What and why A structure block showed no box in the world, so the area it saves or loads could not be seen. Game masters (and spectators) now see it, drawn with gizmos on top of the world. - `BlockEntityWithBoundingBoxRenderer.extractRenderState` / `.extract`: visible for `canUseGameMasterBlocks` or spectator players within the 96-block view distance, using the structure block's `renderMode` and `getRenderableBox`. - `BlockEntityWithBoundingBoxRenderer.submit`: the box in vanilla's light grey (`0xFFE5E5E5`). - `BlockEntityWithBoundingBoxRenderer.renderInvisibleBlocks`: the small cubes for the air (0.4..0.6, blue), barrier (red), light (yellow) and structure void (pink) cells inside the box in SAVE mode with show-air, with vanilla's colours and sizes. `renderStructureVoids` is dead code in 26.3 (`submit` never calls it and `structureVoids` is always null), so it is not ported. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `BlockEntityWithBoundingBoxRenderer.extractRenderState/extract/submit/renderInvisibleBlocks`, `BoundingBoxRenderState`. ## Tests `gizmos` tests for the cube sizes, colours and the cell index order. fmt and clippy `-D warnings` clean on horizon-client. 🤖 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:15:04 +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#5799
No description provided.