[PR #4188] [MERGED] Riders sit in their scale, and on text displays: NPC names over big heads #5471

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4188
Author: @GIGABAIT93
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/scaled-riders


📝 Commits (4)

  • 531cb06 Riders sit in their scale, and on text displays
  • 563ce73 Merge main; scale the rider seat before the rearing offset
  • 2977bad sync_riders: name what it leaves out, not what it keeps
  • cd52b16 Merge main (#4468 seats displays on anything)

📊 Changes

4 files changed (+87 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game/boat_passengers.rs (+2 -6)
📝 crates/horizon-client/src/game/passengers.rs (+27 -3)
📝 crates/horizon-client/src/game/text_displays.rs (+5 -0)
📝 crates/horizon-client/src/mobs/riders.rs (+53 -4)

📄 Description

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

What

This follows up #3776, #3922 and #3965 together. On tensa.co.ua, an NPC plugin enlarges its fake players (minecraft:scale 1.5) and puts a name glyph on each one as a riding text display. It seats the sitting NPCs on an invisible text display. With all three merged, the NPCs are big, but the names sit in their faces and the sitting ones hang in the air. GIGABAIT93 reported it from the nightly. Each PR was proven on its own branch, and the combination wasn't tested. That's on me (the agent).

A debug build logged what the server sends. Each sitting NPC is a minecraft:player riding a text_display at y 55.0. The server puts the NPC at 54.1 = 55.0 − 0.6 × 1.5, as vanilla's positionRider does. Each name is another text_display riding the NPC. Three gaps:

  • A vehicle's passenger attachment ignored its scale. getDimensions scales the attachments with the box. A name on a 1.5× NPC belongs at 2.7, but sat at 1.8. riders::passenger_attachment now multiplies by the vehicle's scale.
  • Players and mannequins had no vehicle attachment off a boat. Avatar.DEFAULT_VEHICLE_ATTACHMENT is (0, 0.6, 0), checked with javap on 26.3, and it scales with the rider. Only boat_passengers used it, through PLAYER_RIDING_OFFSET, and only for minecraft:player. riders::vehicle_attachment now gives avatars 0.6 × scale, so a player on a horse or another mob sits as in vanilla. The boat path uses it too, which adds mannequins and scale there.
  • A mob riding a text display kept the server's position for it. The plugin teleports the NPC to the seat (55.0), and vanilla's rideTick overrides that every tick. position_riders placed riders only on mobs and boats. It now seats a rider of a text display at the display's position (Display is 0 by 0, so its attachment is its feet), less the rider's own attachment.

Only avatars carry a scale here (extra.model_scale), so other mobs' seats are unchanged. The test is a_scaled_player_carries_and_sits_in_its_scale.

Proof (Windows 11, tensa.co.ua)

Same account, same spot, the camera turned to the NPCs with look -90 5, HUD hidden, 90 s after joining:

  • before: the nightly nightly-2026-10-30-a46ce68, which has #3776, #3792, #3922 and #3965;
  • after: this branch at 531cb0661.
before after
before after
Names across the faces (WHITELIST, TENSA, CREATIVE), and the sitting NPCs about a block above their plinths. Every name over its NPC's head. The sitting NPCs sit on their plinths.

Before, horizon-ctl entities put the sitting NPCs at y 55.0, the display's own height, while the server spawned them at 54.1.

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at df583d34a, 6 min 6 s)

Check Result
Scope ✅ 4 files, +81 −10
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 480 passed (39 s)
rustfmt ✅ (8 s)
clippy ✅ (2 min 30 s)
tests: horizon-client ✅ 959 passed (2 min 45 s)
doc tests ✅ 0 passed (3 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/4188 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/scaled-riders` --- ### 📝 Commits (4) - [`531cb06`](https://github.com/horizon-rust/horizon/commit/531cb066144dc75d7ea19dad5b953b78d6f069a9) Riders sit in their scale, and on text displays - [`563ce73`](https://github.com/horizon-rust/horizon/commit/563ce7338e4ed0e69d7ec4373f44a16120c2c2ac) Merge main; scale the rider seat before the rearing offset - [`2977bad`](https://github.com/horizon-rust/horizon/commit/2977badbb8e681b6c7167e16abce8de5bc86b9d2) sync_riders: name what it leaves out, not what it keeps - [`cd52b16`](https://github.com/horizon-rust/horizon/commit/cd52b16c8f2466986802f055e7e0c5fd2548bf93) Merge main (#4468 seats displays on anything) ### 📊 Changes **4 files changed** (+87 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boat_passengers.rs` (+2 -6) 📝 `crates/horizon-client/src/game/passengers.rs` (+27 -3) 📝 `crates/horizon-client/src/game/text_displays.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/riders.rs` (+53 -4) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What This follows up #3776, #3922 and #3965 together. On tensa.co.ua, an NPC plugin enlarges its fake players (`minecraft:scale` 1.5) and puts a name glyph on each one as a riding text display. It seats the sitting NPCs on an invisible text display. With all three merged, the NPCs are big, but the names sit in their faces and the sitting ones hang in the air. GIGABAIT93 reported it from the nightly. Each PR was proven on its own branch, and the combination wasn't tested. That's on me (the agent). A debug build logged what the server sends. Each sitting NPC is a `minecraft:player` riding a `text_display` at y 55.0. The server puts the NPC at 54.1 = 55.0 − 0.6 × 1.5, as vanilla's `positionRider` does. Each name is another `text_display` riding the NPC. Three gaps: - **A vehicle's passenger attachment ignored its scale.** `getDimensions` scales the attachments with the box. A name on a 1.5× NPC belongs at 2.7, but sat at 1.8. `riders::passenger_attachment` now multiplies by the vehicle's scale. - **Players and mannequins had no vehicle attachment off a boat.** `Avatar.DEFAULT_VEHICLE_ATTACHMENT` is (0, 0.6, 0), checked with javap on 26.3, and it scales with the rider. Only `boat_passengers` used it, through `PLAYER_RIDING_OFFSET`, and only for `minecraft:player`. `riders::vehicle_attachment` now gives avatars 0.6 × scale, so a player on a horse or another mob sits as in vanilla. The boat path uses it too, which adds mannequins and scale there. - **A mob riding a text display kept the server's position for it.** The plugin teleports the NPC to the seat (55.0), and vanilla's `rideTick` overrides that every tick. `position_riders` placed riders only on mobs and boats. It now seats a rider of a text display at the display's position (`Display` is 0 by 0, so its attachment is its feet), less the rider's own attachment. Only avatars carry a scale here (`extra.model_scale`), so other mobs' seats are unchanged. The test is `a_scaled_player_carries_and_sits_in_its_scale`. ## Proof (Windows 11, tensa.co.ua) Same account, same spot, the camera turned to the NPCs with `look -90 5`, HUD hidden, 90 s after joining: - **before:** the nightly `nightly-2026-10-30-a46ce68`, which has #3776, #3792, #3922 and #3965; - **after:** this branch at `531cb0661`. | before | after | | --- | --- | | ![before](https://github.com/GIGABAIT93/horizon/releases/download/proof-scaled-riders/riders-before.png) | ![after](https://github.com/GIGABAIT93/horizon/releases/download/proof-scaled-riders/riders-after.png) | | Names across the faces (WHITELIST, TENSA, CREATIVE), and the sitting NPCs about a block above their plinths. | Every name over its NPC's head. The sitting NPCs sit on their plinths. | Before, `horizon-ctl entities` put the sitting NPCs at y 55.0, the display's own height, while the server spawned them at 54.1. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at df583d34a, 6 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +81 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 480 passed (39 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (2 min 30 s) | | tests: horizon-client | ✅ 959 passed (2 min 45 s) | | doc tests | ✅ 0 passed (3 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:12:49 +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#5471
No description provided.