[PR #7869] A scaled enderman's creepy render offset follows minecraft:scale #7872

Open
opened 2026-11-03 07:25:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7869
Author: @MSedgeMC
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/enderman-offset-scale


📝 Commits (6)

  • da5273d fix: scale every living entity's box and eye height by minecraft:scale
  • 8a33c96 test: a cow's 0.9 x 1.4 box at minecraft:scale 2 is 1.8 x 2.8
  • d48b33d port_map: LivingEntity.getDimensions and getScale rows
  • d5a7884 Format the scale dimensions change
  • 09767b3 EndermanRenderer.getRenderOffset: a scaled enderman moves further
  • a0a5d98 port_map: scale rows for the seat and the enderman offset

📊 Changes

8 files changed (+164 additions, -45 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+4 -3)
📝 crates/horizon-client/src/mobs.rs (+4 -3)
📝 crates/horizon-client/src/mobs/living.rs (+117 -9)
📝 crates/horizon-client/src/mobs/render.rs (+25 -8)
📝 crates/horizon-client/src/mobs/riders.rs (+8 -13)
📝 crates/horizon-client/src/shadows.rs (+1 -6)
📝 tools/port_map/client-004.tsv (+1 -1)
📝 tools/port_map/game-006.tsv (+4 -2)

📄 Description

Depends on #7844 (fix/scale-dims), which carries the shared commits df52bce5c, 507a23ff4, 48474b4c5 and dc219db84; this uses its Mob::model_scale(). Independent of #7868, which is the model-matrix half of the same attribute.

Why

EndermanRenderer.getRenderOffset in the 26.3 jar adds a random side offset to a creepy enderman:

double d = 0.02 * (double)state.scale;
return offset.add(random.nextGaussian() * d, 0.0, random.nextGaussian() * d);

state.scale is LivingEntity.getScale(), so the offset follows minecraft:scale. Horizon's enderman_render_offset had the 0.02 fixed and its comment said "the enderman's scale being 1", which was only true before #7844 gave every living entity the attribute. A scaled creepy enderman now has a doubled box and model but still jitters by the scale-1 distance; this multiplies the offset by Mob::model_scale().

Values

Same mob, seed and alpha, at scale 1 and scale 2:

minecraft:scale offset
1 DVec3(0.032739881381368977, 0.0, 0.030079302812250838)
2, before DVec3(0.032739881381368977, 0.0, 0.030079302812250838) (ratio 1.0)
2, after DVec3(0.06547976276273795, 0.0, 0.060158605624501676) (ratio 2.0)

Tests

  • cargo test -q -p horizon-client-lib --lib mobs::render - 29 passed, 1 ignored.
  • cargo clippy -q -p horizon-client-lib --lib --all-targets -- -D warnings clean.
  • cargo fmt --all -- --check clean.

New test: mobs::render::random_texture_tests::a_scaled_creepy_endermans_render_offset_scales.

Port map

LivingEntity.getPassengerRidingPosition's row no longer calls the attachments unscaled by getScale (only the age scale remains a gap), and EndermanRenderer.getRenderOffset's note names its 0.02 * state.scale. python3 tools/port_ledger.py build --jar /tmp/client-26.3.jar and where on both methods show them ported.


🔄 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/7869 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/enderman-offset-scale` --- ### 📝 Commits (6) - [`da5273d`](https://github.com/horizon-rust/horizon/commit/da5273da8f2aadb4f17847765a1f488c63a60757) fix: scale every living entity's box and eye height by minecraft:scale - [`8a33c96`](https://github.com/horizon-rust/horizon/commit/8a33c96638e8ee3d104c27fed4265ab8e487c095) test: a cow's 0.9 x 1.4 box at minecraft:scale 2 is 1.8 x 2.8 - [`d48b33d`](https://github.com/horizon-rust/horizon/commit/d48b33df9aa07bafe8a8eec776e171bdc757a895) port_map: LivingEntity.getDimensions and getScale rows - [`d5a7884`](https://github.com/horizon-rust/horizon/commit/d5a788463ed9801b334ee757afa6025b8d4437ea) Format the scale dimensions change - [`09767b3`](https://github.com/horizon-rust/horizon/commit/09767b3c7dc0f66458716317521f653ee06df3c5) EndermanRenderer.getRenderOffset: a scaled enderman moves further - [`a0a5d98`](https://github.com/horizon-rust/horizon/commit/a0a5d98c3f948b9a3501c494a3d57ebf1bde85b0) port_map: scale rows for the seat and the enderman offset ### 📊 Changes **8 files changed** (+164 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+4 -3) 📝 `crates/horizon-client/src/mobs.rs` (+4 -3) 📝 `crates/horizon-client/src/mobs/living.rs` (+117 -9) 📝 `crates/horizon-client/src/mobs/render.rs` (+25 -8) 📝 `crates/horizon-client/src/mobs/riders.rs` (+8 -13) 📝 `crates/horizon-client/src/shadows.rs` (+1 -6) 📝 `tools/port_map/client-004.tsv` (+1 -1) 📝 `tools/port_map/game-006.tsv` (+4 -2) </details> ### 📄 Description Depends on #7844 (`fix/scale-dims`), which carries the shared commits `df52bce5c`, `507a23ff4`, `48474b4c5` and `dc219db84`; this uses its `Mob::model_scale()`. Independent of #7868, which is the model-matrix half of the same attribute. ## Why `EndermanRenderer.getRenderOffset` in the 26.3 jar adds a random side offset to a creepy enderman: ``` double d = 0.02 * (double)state.scale; return offset.add(random.nextGaussian() * d, 0.0, random.nextGaussian() * d); ``` `state.scale` is `LivingEntity.getScale()`, so the offset follows `minecraft:scale`. Horizon's `enderman_render_offset` had the `0.02` fixed and its comment said "the enderman's scale being 1", which was only true before #7844 gave every living entity the attribute. A scaled creepy enderman now has a doubled box and model but still jitters by the scale-1 distance; this multiplies the offset by `Mob::model_scale()`. ## Values Same mob, seed and alpha, at scale 1 and scale 2: | `minecraft:scale` | offset | |---|---| | 1 | `DVec3(0.032739881381368977, 0.0, 0.030079302812250838)` | | 2, before | `DVec3(0.032739881381368977, 0.0, 0.030079302812250838)` (ratio 1.0) | | 2, after | `DVec3(0.06547976276273795, 0.0, 0.060158605624501676)` (ratio 2.0) | ## Tests - `cargo test -q -p horizon-client-lib --lib mobs::render` - 29 passed, 1 ignored. - `cargo clippy -q -p horizon-client-lib --lib --all-targets -- -D warnings` clean. - `cargo fmt --all -- --check` clean. New test: `mobs::render::random_texture_tests::a_scaled_creepy_endermans_render_offset_scales`. ## Port map `LivingEntity.getPassengerRidingPosition`'s row no longer calls the attachments unscaled by `getScale` (only the age scale remains a gap), and `EndermanRenderer.getRenderOffset`'s note names its `0.02 * state.scale`. `python3 tools/port_ledger.py build --jar /tmp/client-26.3.jar` and `where` on both methods show them ported. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7872
No description provided.