[PR #2695] [MERGED] Vexes hold their item at the small size vanilla uses (fixes #2558) #4549

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2695
Author: @levzzz5154
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/vex-held-item-scale


📝 Commits (3)

  • 4e82a62 Vexes hold their sword at the small size Java uses
  • d966b1e Merge kacpherek's PR #2560: the vex holds its item at the small size
  • e3f6f9d Test the vex's small held item

📊 Changes

1 file changed (+45 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/mobs/render.rs (+45 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself.

What and why

A vex held a normal-sized sword, like a zombie. Vanilla's vex holds a tiny one.

VexModel.translateToHand transforms the root, the body and the arm, then scales by 0.55 and moves the item by the vex's own offset (0.046875, -0.15625, 0.078125 in the arm's space, mirrored for the left arm), so the vex's sword is the small one vanilla shows. Horizon submitted the held item with the generic hand transform, at the full size.

@kacpherek's #2560 draws the item with the vex's own scale and offset. This pull request is that fix plus the regression test it was missing: the test checks the scale of the held item's transform (0.55) and fails without it (the vex's item is drawn at 0.55 scale, got 1). Fixes #2558.

Vanilla reference

  • net.minecraft.client.model.monster.vex.VexModel#translateToHand — the root, the body and the active arm are transformed, then poseStack.scale(0.55F, 0.55F, 0.55F), then offsetStackPosition translates by (0.046875, -0.15625, 0.078125) for the right arm and (-0.046875, -0.15625, 0.078125) for the left.
  • net.minecraft.client.renderer.entity.VexRenderer — the vex draws its held item with ItemInHandLayer, which asks the model for that hand transform.
  • net.minecraft.client.model.ArmedModel#translateToHand — the contract the item-in-hand layer uses for every armed mob.

Self-check

cargo test -p horizon-client --lib -- the_vex_holds_its_item_at_the_small_scale:

running 1 test
test mobs::render::tests::the_vex_holds_its_item_at_the_small_scale ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1164 filtered out; finished in 0.17s

With the vex's scale removed, the same test fails with the vex's item is drawn at 0.55 scale, got 1.

python3 tools/test_entity_model_parity.py --filter vex (the vex's model poses and its drawn normals against the pinned 26.3 client):

31 cases compared over 1 layers
normals: 5208 vertices in 186 drawn parts, 5208 with identical packed bytes, 0 components one step apart at a truncation edge, max byte difference 0 (max normal error 0.00000); 0 collapsed vertices of zero-scaled parts left out
entity model parity ok

cargo test -p horizon-client --lib: test result: ok. 1138 passed; 0 failed; 27 ignored; 0 measured; 0 filtered out.

🤖 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/2695 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/vex-held-item-scale` --- ### 📝 Commits (3) - [`4e82a62`](https://github.com/horizon-rust/horizon/commit/4e82a62489205c0ba7182c37baa47b142c916c8c) Vexes hold their sword at the small size Java uses - [`d966b1e`](https://github.com/horizon-rust/horizon/commit/d966b1e59be726e7411f457d9c22175390ad7c26) Merge kacpherek's PR #2560: the vex holds its item at the small size - [`e3f6f9d`](https://github.com/horizon-rust/horizon/commit/e3f6f9d4dce851c501c20d40a0212c5afebc19a7) Test the vex's small held item ### 📊 Changes **1 file changed** (+45 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/render.rs` (+45 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself. ## What and why A vex held a normal-sized sword, like a zombie. Vanilla's vex holds a tiny one. `VexModel.translateToHand` transforms the root, the body and the arm, then scales by 0.55 and moves the item by the vex's own offset (0.046875, -0.15625, 0.078125 in the arm's space, mirrored for the left arm), so the vex's sword is the small one vanilla shows. Horizon submitted the held item with the generic hand transform, at the full size. @kacpherek's #2560 draws the item with the vex's own scale and offset. This pull request is that fix plus the regression test it was missing: the test checks the scale of the held item's transform (0.55) and fails without it (`the vex's item is drawn at 0.55 scale, got 1`). Fixes #2558. ## Vanilla reference - `net.minecraft.client.model.monster.vex.VexModel#translateToHand` — the root, the body and the active arm are transformed, then `poseStack.scale(0.55F, 0.55F, 0.55F)`, then `offsetStackPosition` translates by (0.046875, -0.15625, 0.078125) for the right arm and (-0.046875, -0.15625, 0.078125) for the left. - `net.minecraft.client.renderer.entity.VexRenderer` — the vex draws its held item with `ItemInHandLayer`, which asks the model for that hand transform. - `net.minecraft.client.model.ArmedModel#translateToHand` — the contract the item-in-hand layer uses for every armed mob. ## Self-check `cargo test -p horizon-client --lib -- the_vex_holds_its_item_at_the_small_scale`: ``` running 1 test test mobs::render::tests::the_vex_holds_its_item_at_the_small_scale ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1164 filtered out; finished in 0.17s ``` With the vex's scale removed, the same test fails with `the vex's item is drawn at 0.55 scale, got 1`. `python3 tools/test_entity_model_parity.py --filter vex` (the vex's model poses and its drawn normals against the pinned 26.3 client): ``` 31 cases compared over 1 layers normals: 5208 vertices in 186 drawn parts, 5208 with identical packed bytes, 0 components one step apart at a truncation edge, max byte difference 0 (max normal error 0.00000); 0 collapsed vertices of zero-scaled parts left out entity model parity ok ``` `cargo test -p horizon-client --lib`: `test result: ok. 1138 passed; 0 failed; 27 ignored; 0 measured; 0 filtered out`. 🤖 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 04:17:59 +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#4549
No description provided.