[PR #7793] The block pick uses interaction shapes for cauldrons, composters, hoppers and scaffolding #7825

Open
opened 2026-11-03 07:24:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7793
Author: @xFedeT
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/interaction-shapes


📝 Commits (1)

  • 02bcaa3 The block pick takes the interaction shape's face for cauldrons, composters, hoppers and scaffolding

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game.rs (+27 -1)
➕ crates/horizon-client/src/game/interaction_shapes.rs (+122 -0)

📄 Description

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

Fixes #7754

Vanilla picks the targeted block with BlockGetter.clipWithInteractionOverride: when the ray enters a block's interaction shape (BlockBehaviour.getInteractionShape) before its outline, the hit keeps the outline's point and takes the interaction shape's face. Four blocks override it in 26.3: AbstractCauldronBlock (SHAPE_INSIDE, the box 2..14 x, 4..16 y), ComposterBlock and ScaffoldingBlock (a full block) and HopperBlock (its inside column 11..16, plus the spout turned to facing when it points sideways). Horizon's player pick (Game::clip_ray) clipped outlines only, so a bowl was targeted on its far inside wall and a placement went beside it instead of on top.

I did not load interaction-shapes.nbt (the prepared resources don't ship it, and it needs the exporter): these four are written out in game/interaction_shapes.rs, constants copied from the 26.3 sources, and clip_ray applies the override to the blocks that have one. Other blocks are untouched.

Tests: a_ray_over_a_cauldron_enters_its_inside_through_the_top (the ray of the issue's cauldron row: eyes [0.5, 101.27, 0.5], pitch 7°, block at [0, 100, 2]: up face) and a check of the shapes. cargo test -p horizon-client --lib interaction_shapes, clippy. I did not run the full table of the issue in game, nor a same-ray oracle.

🤖 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/7793 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/interaction-shapes` --- ### 📝 Commits (1) - [`02bcaa3`](https://github.com/horizon-rust/horizon/commit/02bcaa34ceeeedcd9258a642132446ff846dd5bd) The block pick takes the interaction shape's face for cauldrons, composters, hoppers and scaffolding ### 📊 Changes **2 files changed** (+149 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+27 -1) ➕ `crates/horizon-client/src/game/interaction_shapes.rs` (+122 -0) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #7754 Vanilla picks the targeted block with `BlockGetter.clipWithInteractionOverride`: when the ray enters a block's interaction shape (`BlockBehaviour.getInteractionShape`) before its outline, the hit keeps the outline's point and takes the interaction shape's face. Four blocks override it in 26.3: `AbstractCauldronBlock` (`SHAPE_INSIDE`, the box 2..14 x, 4..16 y), `ComposterBlock` and `ScaffoldingBlock` (a full block) and `HopperBlock` (its `inside` column 11..16, plus the spout turned to `facing` when it points sideways). Horizon's player pick (`Game::clip_ray`) clipped outlines only, so a bowl was targeted on its far inside wall and a placement went beside it instead of on top. I did not load `interaction-shapes.nbt` (the prepared resources don't ship it, and it needs the exporter): these four are written out in `game/interaction_shapes.rs`, constants copied from the 26.3 sources, and `clip_ray` applies the override to the blocks that have one. Other blocks are untouched. Tests: `a_ray_over_a_cauldron_enters_its_inside_through_the_top` (the ray of the issue's cauldron row: eyes [0.5, 101.27, 0.5], pitch 7°, block at [0, 100, 2]: up face) and a check of the shapes. `cargo test -p horizon-client --lib interaction_shapes`, clippy. I did not run the full table of the issue in game, nor a same-ray oracle. 🤖 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>
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#7825
No description provided.