[PR #5596] [MERGED] F3+B: draw the Interaction entity's hitbox #6375

Closed
opened 2026-11-03 06:19:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5596
Author: @rdbtCVS
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/5435-interaction-hitbox


📝 Commits (1)

  • d4e49be F3+B: draw the Interaction entity's hitbox

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/debug_keys.rs (+14 -0)

📄 Description

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

F3+B now draws the hitboxes of minecraft:interaction entities. Servers use these entities for clickable areas (Denizen, Nexo, ModelEngine).

Why: in vanilla 26.3, EntityHitboxDebugRenderer.emitGizmos goes through every visible entity in level.entitiesForRendering() and calls showHitboxes on each one. InteractionRenderer is a NoopRenderer, but the hitbox doesn't come from the entity renderer, so Interactions get a box too. Horizon's hitbox gizmos (game/debug_keys.rs) covered mobs, items, paintings, boats and other entities, but never self.interactions.

What: the hitbox loop now draws each Interaction's box, from RemoteInteraction::bounds() (Interaction.refreshDimensions). It also draws the blue view arrow from its eye height. Interaction.getDimensions is EntityDimensions.scalable(width, height), so the eyes sit at 0.85 of the height. An Interaction isn't a LivingEntity, so there's no red eye line.

Two parts are not drawn yet, for the same reasons as some other entities in this function:

  • The arrow always points south: Horizon doesn't store an Interaction's rotation yet.
  • The yellow riding box: this function doesn't draw it for any entity yet.

Fixes #5435

Tests

  • cargo fmt --check: ok
  • cargo clippy -p horizon-client --all-targets -- -D warnings: clean
  • cargo test -p horizon-client --bin horizon-client -- interactions debug_keys gizmo: 4 passed
  • cargo test -p horizon-client --lib gizmos: 7 passed
  • tools/pr_ready.py was not run. This touches one file of the game binary (a debug overlay with no harness), so CI's parity job covers the rest.

🤖 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/5596 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5435-interaction-hitbox` --- ### 📝 Commits (1) - [`d4e49be`](https://github.com/horizon-rust/horizon/commit/d4e49be59facb5303707ff1e6c95025a1cade4b4) F3+B: draw the Interaction entity's hitbox ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/debug_keys.rs` (+14 -0) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. F3+B now draws the hitboxes of `minecraft:interaction` entities. Servers use these entities for clickable areas (Denizen, Nexo, ModelEngine). **Why:** in vanilla 26.3, `EntityHitboxDebugRenderer.emitGizmos` goes through every visible entity in `level.entitiesForRendering()` and calls `showHitboxes` on each one. `InteractionRenderer` is a `NoopRenderer`, but the hitbox doesn't come from the entity renderer, so Interactions get a box too. Horizon's hitbox gizmos (`game/debug_keys.rs`) covered mobs, items, paintings, boats and other entities, but never `self.interactions`. **What:** the hitbox loop now draws each Interaction's box, from `RemoteInteraction::bounds()` (`Interaction.refreshDimensions`). It also draws the blue view arrow from its eye height. `Interaction.getDimensions` is `EntityDimensions.scalable(width, height)`, so the eyes sit at 0.85 of the height. An Interaction isn't a `LivingEntity`, so there's no red eye line. Two parts are not drawn yet, for the same reasons as some other entities in this function: - The arrow always points south: Horizon doesn't store an Interaction's rotation yet. - The yellow riding box: this function doesn't draw it for any entity yet. Fixes #5435 **Tests** - `cargo fmt --check`: ok - `cargo clippy -p horizon-client --all-targets -- -D warnings`: clean - `cargo test -p horizon-client --bin horizon-client -- interactions debug_keys gizmo`: 4 passed - `cargo test -p horizon-client --lib gizmos`: 7 passed - `tools/pr_ready.py` was not run. This touches one file of the game binary (a debug overlay with no harness), so CI's parity job covers the rest. 🤖 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 06:19:21 +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#6375
No description provided.