[PR #3922] [MERGED] Other players and mannequins take their minecraft:scale #5290

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

📋 Pull Request Information

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

Base: main ← Head: feat/remote-player-scale


📝 Commits (1)

  • 8974e07 Other players and mannequins take their minecraft:scale

📊 Changes

2 files changed (+68 additions, -25 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+65 -23)
📝 crates/horizon-client/src/mobs.rs (+3 -2)

📄 Description

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

What

#3752 scales the local player's model by its minecraft:scale. Other players and mannequins still drew at their normal size. remote_mob_attributes (ClientPacketListener.handleUpdateAttributes) read only minecraft:max_health and dropped everything else in the packet. So a server's /attribute … minecraft:scale on another player, or an NPC plugin that enlarges its fake players, showed nothing.

  • remote_mob_attributes now also reads minecraft:scale and puts it in extra.model_scale. That is the field species_scale already applies to avatars on top of AvatarRenderer's 0.9375, as LivingEntityRenderState.scale does. The value is sanitized by the attribute's own range (0.0625..16).
  • The value calculation (AttributeInstance.calculateValue: base, then ADD_VALUE, then ADD_MULTIPLIED_BASE, then each ADD_MULTIPLIED_TOTAL) is now snapshot_value, shared by both attributes. Its test is attribute_values_add_then_multiply_as_vanilla.

Only avatars (players, mannequins) draw model_scale today, so other mobs' scale is unchanged.

Proof (Windows 11)

Mannequins in single player. The integrated server's client goes through this same remote path. Three mannequins in a row: /attribute … minecraft:scale base set 2, none, 0.5. The before build is 8f0c17895 (main without this change), after is this branch.

before after
before after
All three are the same size, though the server accepted both commands. 2×, 1× and 0.5×.

A live server. tensa.co.ua is a Paper server whose NPC plugin enlarges the four NPCs at spawn. These are two joins with the same account: before is the nightly nightly-2026-10-29-4baa571, after is this branch. The spawn view shifted a little between the joins, so compare each NPC with its plinth. The NPCs' name glyphs at their feet and their default skins are #3776 and #3792, which this branch doesn't include.

before after
before after
Normal-sized NPCs. The NPCs at the plugin's size, about half again as tall against their plinths.

Not in this PR:

  • Entity shadows don't scale with scale for any mob yet: vanilla's LivingEntityRenderer.getShadowRadius multiplies by it, for babies and the local player too.
  • A scaled vehicle's passenger seat (getPassengerRidingPosition uses the scaled dimensions) waits on #3776.

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at db0d65ee3, 9 min 31 s)

Check Result
Scope ✅ 2 files, +68 −25
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 423 passed (49 s)
rustfmt ✅ (10 s)
clippy ✅ (2 min 55 s)
tests: horizon-client ✅ 860 passed (3 min 48 s)
doc tests ✅ 0 passed (1 min 49 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/3922 **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:** `feat/remote-player-scale` --- ### 📝 Commits (1) - [`8974e07`](https://github.com/horizon-rust/horizon/commit/8974e07eec6b150675b248f59682eb4412e144a4) Other players and mannequins take their minecraft:scale ### 📊 Changes **2 files changed** (+68 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+65 -23) 📝 `crates/horizon-client/src/mobs.rs` (+3 -2) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What #3752 scales the local player's model by its `minecraft:scale`. Other players and mannequins still drew at their normal size. `remote_mob_attributes` (`ClientPacketListener.handleUpdateAttributes`) read only `minecraft:max_health` and dropped everything else in the packet. So a server's `/attribute … minecraft:scale` on another player, or an NPC plugin that enlarges its fake players, showed nothing. - `remote_mob_attributes` now also reads `minecraft:scale` and puts it in `extra.model_scale`. That is the field `species_scale` already applies to avatars on top of `AvatarRenderer`'s 0.9375, as `LivingEntityRenderState.scale` does. The value is sanitized by the attribute's own range (0.0625..16). - The value calculation (`AttributeInstance.calculateValue`: base, then `ADD_VALUE`, then `ADD_MULTIPLIED_BASE`, then each `ADD_MULTIPLIED_TOTAL`) is now `snapshot_value`, shared by both attributes. Its test is `attribute_values_add_then_multiply_as_vanilla`. Only avatars (players, mannequins) draw `model_scale` today, so other mobs' scale is unchanged. ## Proof (Windows 11) **Mannequins in single player.** The integrated server's client goes through this same remote path. Three mannequins in a row: `/attribute … minecraft:scale base set 2`, none, `0.5`. The `before` build is `8f0c17895` (main without this change), `after` is this branch. | before | after | | --- | --- | | ![before](https://github.com/GIGABAIT93/horizon/releases/download/proof-remote-scale/scale-mannequins-before.png) | ![after](https://github.com/GIGABAIT93/horizon/releases/download/proof-remote-scale/scale-mannequins-after.png) | | All three are the same size, though the server accepted both commands. | 2×, 1× and 0.5×. | **A live server.** tensa.co.ua is a Paper server whose NPC plugin enlarges the four NPCs at spawn. These are two joins with the same account: `before` is the nightly `nightly-2026-10-29-4baa571`, `after` is this branch. The spawn view shifted a little between the joins, so compare each NPC with its plinth. The NPCs' name glyphs at their feet and their default skins are #3776 and #3792, which this branch doesn't include. | before | after | | --- | --- | | ![before](https://github.com/GIGABAIT93/horizon/releases/download/proof-remote-scale/scale-tensa-before.png) | ![after](https://github.com/GIGABAIT93/horizon/releases/download/proof-remote-scale/scale-tensa-after.png) | | Normal-sized NPCs. | The NPCs at the plugin's size, about half again as tall against their plinths. | Not in this PR: - Entity shadows don't scale with `scale` for any mob yet: vanilla's `LivingEntityRenderer.getShadowRadius` multiplies by it, for babies and the local player too. - A scaled vehicle's passenger seat (`getPassengerRidingPosition` uses the scaled dimensions) waits on #3776. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at db0d65ee3, 9 min 31 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +68 −25 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 423 passed (49 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (2 min 55 s) | | tests: horizon-client | ✅ 860 passed (3 min 48 s) | | doc tests | ✅ 0 passed (1 min 49 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:33 +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#5290
No description provided.