[PR #3795] [CLOSED] Client: item and block display entities and interaction click boxes #5222

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3795
Author: @Bloodulon
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: pr/displays-interactions


📝 Commits (3)

  • d7c2da5 Client: item and block display entities and interaction click boxes
  • f9e43a5 Merge origin/main into pr/displays-interactions
  • 9359931 Move displays with the vehicle a server mounts them on

📊 Changes

14 files changed (+847 additions, -24 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -0)
➕ crates/horizon-client/src/game/displays.rs (+421 -0)
📝 crates/horizon-client/src/game/hand.rs (+1 -0)
➕ crates/horizon-client/src/game/interactions.rs (+132 -0)
📝 crates/horizon-client/src/game/lan_vehicles.rs (+5 -1)
📝 crates/horizon-client/src/game/pick_entity.rs (+3 -1)
📝 crates/horizon-client/src/game/remote.rs (+29 -4)
📝 crates/horizon-client/src/game/remote_objects.rs (+45 -0)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+147 -0)
📝 crates/horizon-client/src/game/text_displays.rs (+34 -8)
📝 crates/horizon-client/src/item_render.rs (+3 -1)
📝 crates/horizon-client/src/text_display.rs (+11 -0)
📝 tools/port_map/client-003.tsv (+4 -4)
📝 tools/port_map/game-004.tsv (+5 -5)

📄 Description

🤖 Opened by Bloodulon's AI agent (Qoder), not by Bloodulon personally.

What and why

minecraft:item_display, minecraft:block_display and minecraft:interaction are the entities servers use for menus, leaderboards, holograms and clickable props. Horizon rendered text displays only, so on a Purpur 26.2 server with Denizen/Nexo item displays sat at the origin facing the wrong way with flickering textures, block displays did not render, and interaction boxes did nothing.

Displays (game/displays.rs)

  • Item stack, block state, scale, translation, left and right rotation, billboard mode, brightness, glow colour, view range, interpolation duration and delay.
  • Position and rotation interpolation, the display pose T·L·S·R, and geometry through the existing item and block renderers.
  • Item displays take the extra Axis.YP half turn that DisplayRenderer$ItemDisplayRenderer applies; block displays use the pose alone.
  • Item quads keep back-face culling, as ITEM_CUTOUT/ITEM_TRANSLUCENT do in vanilla, so the double-sided quads Nexo models use no longer z-fight.
  • Culling follows the live view_range (range × 64 × view scale).

Interactions (game/interactions.rs)

  • Width, height and response (data ids 8/9/10), entity and block targeting, the Interact packet with hand and hit location, and no pick result.
  • A response makes the click SUCCESS (with the swing); without one it is CONSUME, matching skipAttackInteraction.

The display and interaction paths share the hit-testing wiring in game.rs, remote.rs and hand.rs, which is why they are in one PR.

Also: a loader error is no longer replaced by a channel disconnect while the loading screen drains events.

Related: #3039 (block displays).

Vanilla reference

  • net.minecraft.client.renderer.entity.DisplayRenderer.submit / calculateOrientation — pose order T·L·S·R and billboard modes.
  • DisplayRenderer$ItemDisplayRenderer.submitInner — an empty stack returns; rotate(Axis.YP, π) before ItemStackRenderState.submit.
  • DisplayRenderer$BlockDisplayRenderer.submitInner — BlockModelRenderState.submit under the pose alone.
  • Display.shouldRenderAtSqrDistance, Display.RENDER_STATE_IDS.
  • Interaction.interact, Interaction.skipAttackInteraction, Interaction.getPickResult (none), data ids 8 width, 9 height, 10 response.
  • RenderPipelines.ITEM_SNIPPET / ITEM_CUTOUT / ITEM_TRANSLUCENT; RenderPipeline$Builder.build leaves cull at its default of true.
  • Harness: none — this is entity rendering and input, not a data mapping. Checked against the 26.3 bytecode with tools/rea_vanilla.py.

Self-check

pr_ready (tools/pr_ready.py --quick on DESKTOP-TL7HN40, against origin/main at b97e39e07, 6 min 16 s)

Check Result
Scope ⚠️ 14 files, +609 −24; 633 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 423 passed (48 s)
rustfmt ✅ (7 s)
clippy ❌ failed (15 s)
tests: horizon-client ✅ 869 passed (3 min 27 s)
doc tests ✅ 0 passed (1 min 35 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Clippy fails only on pre-existing lints in files this branch does not touch (horizon-world datafix/schema.rs, worldgen/aquifer/noise_based.rs; horizon-client-render/src/camera.rs:676; horizon-client mobs/ai.rs, ambient.rs, tame.rs, warden.rs, axolotl.rs) under the locally installed Rust 1.95.0. None of the touched files produce a lint.

Screenshots

None attached (no capture setup); the display paths were checked against the vanilla bytecode and the client was started with a prepared resource root.

  • Allow edits by maintainers

🤖 Generated with Qoder


🔄 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/3795 **Author:** [@Bloodulon](https://github.com/Bloodulon) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/displays-interactions` --- ### 📝 Commits (3) - [`d7c2da5`](https://github.com/horizon-rust/horizon/commit/d7c2da5bc121c268454b16c7a5dc3f1654c007e4) Client: item and block display entities and interaction click boxes - [`f9e43a5`](https://github.com/horizon-rust/horizon/commit/f9e43a53757492e687d857ff0ddfb1cc438be785) Merge origin/main into pr/displays-interactions - [`9359931`](https://github.com/horizon-rust/horizon/commit/9359931c0dbd33b721ce9fa52c0b980b1b25b33b) Move displays with the vehicle a server mounts them on ### 📊 Changes **14 files changed** (+847 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -0) ➕ `crates/horizon-client/src/game/displays.rs` (+421 -0) 📝 `crates/horizon-client/src/game/hand.rs` (+1 -0) ➕ `crates/horizon-client/src/game/interactions.rs` (+132 -0) 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+5 -1) 📝 `crates/horizon-client/src/game/pick_entity.rs` (+3 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+29 -4) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+45 -0) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+147 -0) 📝 `crates/horizon-client/src/game/text_displays.rs` (+34 -8) 📝 `crates/horizon-client/src/item_render.rs` (+3 -1) 📝 `crates/horizon-client/src/text_display.rs` (+11 -0) 📝 `tools/port_map/client-003.tsv` (+4 -4) 📝 `tools/port_map/game-004.tsv` (+5 -5) </details> ### 📄 Description > 🤖 Opened by Bloodulon's AI agent (Qoder), not by Bloodulon personally. ## What and why `minecraft:item_display`, `minecraft:block_display` and `minecraft:interaction` are the entities servers use for menus, leaderboards, holograms and clickable props. Horizon rendered text displays only, so on a Purpur 26.2 server with Denizen/Nexo item displays sat at the origin facing the wrong way with flickering textures, block displays did not render, and interaction boxes did nothing. **Displays** (`game/displays.rs`) - Item stack, block state, scale, translation, left and right rotation, billboard mode, brightness, glow colour, view range, interpolation duration and delay. - Position and rotation interpolation, the display pose T·L·S·R, and geometry through the existing item and block renderers. - Item displays take the extra `Axis.YP` half turn that `DisplayRenderer$ItemDisplayRenderer` applies; block displays use the pose alone. - Item quads keep back-face culling, as `ITEM_CUTOUT`/`ITEM_TRANSLUCENT` do in vanilla, so the double-sided quads Nexo models use no longer z-fight. - Culling follows the live `view_range` (range × 64 × view scale). **Interactions** (`game/interactions.rs`) - Width, height and response (data ids 8/9/10), entity and block targeting, the Interact packet with hand and hit location, and no pick result. - A response makes the click SUCCESS (with the swing); without one it is CONSUME, matching `skipAttackInteraction`. The display and interaction paths share the hit-testing wiring in `game.rs`, `remote.rs` and `hand.rs`, which is why they are in one PR. Also: a loader error is no longer replaced by a channel disconnect while the loading screen drains events. Related: #3039 (block displays). ## Vanilla reference - `net.minecraft.client.renderer.entity.DisplayRenderer.submit` / `calculateOrientation` — pose order T·L·S·R and billboard modes. - `DisplayRenderer$ItemDisplayRenderer.submitInner` — an empty stack returns; `rotate(Axis.YP, π)` before `ItemStackRenderState.submit`. - `DisplayRenderer$BlockDisplayRenderer.submitInner` — `BlockModelRenderState.submit` under the pose alone. - `Display.shouldRenderAtSqrDistance`, `Display.RENDER_STATE_IDS`. - `Interaction.interact`, `Interaction.skipAttackInteraction`, `Interaction.getPickResult` (none), data ids 8 width, 9 height, 10 response. - `RenderPipelines.ITEM_SNIPPET` / `ITEM_CUTOUT` / `ITEM_TRANSLUCENT`; `RenderPipeline$Builder.build` leaves `cull` at its default of true. - Harness: none — this is entity rendering and input, not a data mapping. Checked against the 26.3 bytecode with `tools/rea_vanilla.py`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DESKTOP-TL7HN40, against origin/main at b97e39e07, 6 min 16 s) | Check | Result | | --- | --- | | Scope | ⚠️ 14 files, +609 −24; 633 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 423 passed (48 s) | | rustfmt | ✅ (7 s) | | clippy | ❌ failed (15 s) | | tests: horizon-client | ✅ 869 passed (3 min 27 s) | | doc tests | ✅ 0 passed (1 min 35 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Clippy fails only on pre-existing lints in files this branch does not touch (`horizon-world` `datafix/schema.rs`, `worldgen/aquifer/noise_based.rs`; `horizon-client-render/src/camera.rs:676`; `horizon-client` `mobs/ai.rs`, `ambient.rs`, `tame.rs`, `warden.rs`, `axolotl.rs`) under the locally installed Rust 1.95.0. None of the touched files produce a lint. ## Screenshots None attached (no capture setup); the display paths were checked against the vanilla bytecode and the client was started with a prepared resource root. - [x] Allow edits by maintainers 🤖 Generated with Qoder --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11: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#5222
No description provided.