[PR #3776] [MERGED] Text displays ride their vehicles: an NPC's name sits over its head #5211

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

📋 Pull Request Information

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

Base: main ← Head: fix/text-display-passengers


📝 Commits (4)

  • bf99284 Text displays ride their vehicles: an NPC's name sits over its head
  • b6b9a5a Text displays riding the local player sit over its head too
  • 6d666c3 Merge remote-tracking branch 'origin/main' into upd-3776
  • 37a1e88 Merge main: RemoteTextDisplay::new takes what the display shows

📊 Changes

3 files changed (+68 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/passengers.rs (+31 -0)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+7 -0)
📝 crates/horizon-client/src/game/text_displays.rs (+30 -0)

📄 Description

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

What and why

On servers whose NPC plugins hang a name on an NPC (a fake player) with a text display riding it, Horizon drew the name at the NPC's feet: on tensa.co.ua's lobby the glyph titles (CHAOS, WHITELIST, CREATIVE, made with a resource pack font) sat on the pedestals under the NPCs, their second lines hidden inside the blocks, while vanilla shows them over the heads. Menus made with the same glyphs were fine, so it was never the font.

Vanilla seats a passenger every tick (Entity.rideTick → positionRider): at getPassengerRidingPosition, the vehicle's passenger attachment from getDimensions(pose) (for a player, the top of its box), less the passenger's own getVehicleAttachmentPoint, which for a display is 0 (its dimensions are 0 by 0). Checked in the 26.3 jar. The server sends no position for a passenger.

remote_set_passengers (handleSetEntityPassengersPacket) placed only mobs and the local player; text displays live in their own map, so a ridden one stayed where it spawned.

  • RemoteTextDisplay keeps vehicle (the mob it rides), set and cleared with the mobs in remote_set_passengers (a vehicle's removal clears it too, as it already sends no passengers).
  • position_riders, which already seats mob passengers after the tick, seats each riding text display with riders::seat(passenger_attachment(vehicle), 0, ...). ride sets the position (and the teleport target, ending any position interpolation), keeping the last tick's position as previous, so a moving vehicle carries the name smoothly.
  • Test a_ridden_display_moves_from_seat_to_seat.

Checked in the game on tensa.co.ua, signed in, with this branch (and #3738, so the join doesn't wait on the resource pack): every title and its subtitle now hangs over its NPC's head, as in vanilla.

Not covered here: a display riding something that isn't a mob here (an armor stand, another display) keeps the server's position as before; the vehicle's minecraft:scale doesn't raise the seat yet because Horizon doesn't apply other entities' scale (noted on #3752).

Suggested label: none (a fix).

Vanilla reference

Entity.rideTick, Entity.positionRider(Entity, MoveFunction), LivingEntity.getPassengerRidingPosition, Entity.getVehicleAttachmentPoint (EntityAttachment.VEHICLE), ClientPacketListener.handleSetEntityPassengersPacket. No harness covers a client's passengers; the existing text display harnesses (text_display, text_display_render, text_display_transform) cover what this leaves alone.

Self-check

Run on Linux (WSL2).

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at de8ffbb29, 7 min 40 s)

Check Result
Scope ✅ 3 files, +54 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 416 passed (45 s)
rustfmt ✅ (11 s)
clippy ✅ (54 s)
tests: horizon-client ✅ 837 passed (4 min 11 s)
doc tests ✅ 0 passed (1 min 39 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)

🤖 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/3776 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/text-display-passengers` --- ### 📝 Commits (4) - [`bf99284`](https://github.com/horizon-rust/horizon/commit/bf9928423c48d8a8579d8aef2562a2bb6451b7c9) Text displays ride their vehicles: an NPC's name sits over its head - [`b6b9a5a`](https://github.com/horizon-rust/horizon/commit/b6b9a5a3077bb6c9f5db9f5c560c116b8134e5bd) Text displays riding the local player sit over its head too - [`6d666c3`](https://github.com/horizon-rust/horizon/commit/6d666c30e2d6507040ac3281b83cc462b425d896) Merge remote-tracking branch 'origin/main' into upd-3776 - [`37a1e88`](https://github.com/horizon-rust/horizon/commit/37a1e8859f8eb983d24f7be8e4959d0ea45ca55d) Merge main: RemoteTextDisplay::new takes what the display shows ### 📊 Changes **3 files changed** (+68 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/passengers.rs` (+31 -0) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+7 -0) 📝 `crates/horizon-client/src/game/text_displays.rs` (+30 -0) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What and why On servers whose NPC plugins hang a name on an NPC (a fake player) with a text display riding it, Horizon drew the name at the NPC's feet: on tensa.co.ua's lobby the glyph titles (CHAOS, WHITELIST, CREATIVE, made with a resource pack font) sat on the pedestals under the NPCs, their second lines hidden inside the blocks, while vanilla shows them over the heads. Menus made with the same glyphs were fine, so it was never the font. Vanilla seats a passenger every tick (`Entity.rideTick` → `positionRider`): at `getPassengerRidingPosition`, the vehicle's passenger attachment from `getDimensions(pose)` (for a player, the top of its box), less the passenger's own `getVehicleAttachmentPoint`, which for a display is 0 (its dimensions are 0 by 0). Checked in the 26.3 jar. The server sends no position for a passenger. `remote_set_passengers` (`handleSetEntityPassengersPacket`) placed only mobs and the local player; text displays live in their own map, so a ridden one stayed where it spawned. - `RemoteTextDisplay` keeps `vehicle` (the mob it rides), set and cleared with the mobs in `remote_set_passengers` (a vehicle's removal clears it too, as it already sends no passengers). - `position_riders`, which already seats mob passengers after the tick, seats each riding text display with `riders::seat(passenger_attachment(vehicle), 0, ...)`. `ride` sets the position (and the teleport target, ending any position interpolation), keeping the last tick's position as `previous`, so a moving vehicle carries the name smoothly. - Test `a_ridden_display_moves_from_seat_to_seat`. Checked in the game on tensa.co.ua, signed in, with this branch (and #3738, so the join doesn't wait on the resource pack): every title and its subtitle now hangs over its NPC's head, as in vanilla. Not covered here: a display riding something that isn't a mob here (an armor stand, another display) keeps the server's position as before; the vehicle's `minecraft:scale` doesn't raise the seat yet because Horizon doesn't apply other entities' scale (noted on #3752). Suggested label: none (a fix). ## Vanilla reference `Entity.rideTick`, `Entity.positionRider(Entity, MoveFunction)`, `LivingEntity.getPassengerRidingPosition`, `Entity.getVehicleAttachmentPoint` (`EntityAttachment.VEHICLE`), `ClientPacketListener.handleSetEntityPassengersPacket`. No harness covers a client's passengers; the existing text display harnesses (`text_display`, `text_display_render`, `text_display_transform`) cover what this leaves alone. ## Self-check Run on Linux (WSL2). **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at de8ffbb29, 7 min 40 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +54 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 416 passed (45 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (54 s) | | tests: horizon-client | ✅ 837 passed (4 min 11 s) | | doc tests | ✅ 0 passed (1 min 39 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) | 🤖 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:11:00 +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#5211
No description provided.