[PR #2483] [MERGED] Light, scaffolding and shulker box outlines follow the held item and the lid #4358

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

📋 Pull Request Information

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

Base: main ← Head: fix/held-item-outline


📝 Commits (1)

  • 06b046d Light, scaffolding and shulker box outlines follow the held item and the lid

📊 Changes

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

View changed files

📝 crates/horizon-client/src/blocks.rs (+1 -1)
📝 crates/horizon-client/src/game.rs (+48 -0)

📄 Description

What and why

Three blocks used their exported, context-free outline. In vanilla their getShape depends on more than the block state:

  • Light block: it can't be targeted or broken while you hold a light block. Vanilla makes it a full block in that case, so you can aim at it, see its outline and break it. Now it does.
  • Scaffolding: while you hold scaffolding, the crosshair went between its legs to the block behind. Vanilla targets the full block, which is how you build scaffolding sideways from any face. Now it does.
  • Shulker box: the outline stayed a cube while the lid was open. Vanilla grows it with the lid, by up to half a block towards the facing. Now it does.

Picking and the drawn outline both go through the new context_outline. Collision is unchanged.

Vanilla reference

  • LightBlock.getShape: context.isHoldingItem(Items.LIGHT) ? Shapes.block() : Shapes.empty().
  • ScaffoldingBlock.getShape: a full block when holding its own item, otherwise the stable or unstable shape.
  • EntityCollisionContext: the held item is the main hand item.
  • ShulkerBoxBlock.getShape, ShulkerBoxBlockEntity.getBoundingBox and Shulker.getProgressAabb.

Self-check

cargo check -p horizon-client passes. Checked in game:

  • Holding a light block, the crosshair targets it (north face at z = 2.0). Holding stone, it passes through to the sand.
  • Holding scaffolding, the crosshair hits its side between the legs and the full-block outline is drawn. Holding stone, it passes through.

🔄 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/2483 **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/held-item-outline` --- ### 📝 Commits (1) - [`06b046d`](https://github.com/horizon-rust/horizon/commit/06b046d8fc3046bc83ad0ee1ba946e2e25676931) Light, scaffolding and shulker box outlines follow the held item and the lid ### 📊 Changes **2 files changed** (+49 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/blocks.rs` (+1 -1) 📝 `crates/horizon-client/src/game.rs` (+48 -0) </details> ### 📄 Description ## What and why Three blocks used their exported, context-free outline. In vanilla their `getShape` depends on more than the block state: - **Light block:** it can't be targeted or broken while you hold a light block. Vanilla makes it a full block in that case, so you can aim at it, see its outline and break it. Now it does. - **Scaffolding:** while you hold scaffolding, the crosshair went between its legs to the block behind. Vanilla targets the full block, which is how you build scaffolding sideways from any face. Now it does. - **Shulker box:** the outline stayed a cube while the lid was open. Vanilla grows it with the lid, by up to half a block towards the facing. Now it does. Picking and the drawn outline both go through the new `context_outline`. Collision is unchanged. ## Vanilla reference - `LightBlock.getShape`: `context.isHoldingItem(Items.LIGHT) ? Shapes.block() : Shapes.empty()`. - `ScaffoldingBlock.getShape`: a full block when holding its own item, otherwise the stable or unstable shape. - `EntityCollisionContext`: the held item is the main hand item. - `ShulkerBoxBlock.getShape`, `ShulkerBoxBlockEntity.getBoundingBox` and `Shulker.getProgressAabb`. ## Self-check `cargo check -p horizon-client` passes. Checked in game: - Holding a light block, the crosshair targets it (north face at z = 2.0). Holding stone, it passes through to the sand. - Holding scaffolding, the crosshair hits its side between the legs and the full-block outline is drawn. Holding stone, it passes through. --- <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:35 +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#4358
No description provided.