Items were drawn at the hand of the unbent arm. PlayerModelMixin hooks the end of PlayerModel.translateToHand and adds one more rigid transform (BendTransforms.attachAt). It's the same move the ring at the hand makes, so the item stays in the fist and turns with the forearm, the way the end of the sleeve does.
The hook is on PlayerModel because it overrides translateToHand (to handle slim arms) and never calls HumanoidModel's version. This needed two Stonecutter branches:
the class moved to model.player in 1.21.11
the method gained a render-state parameter in 1.21.9
First-person arm
The first-person arm is drawn from the same shared model without calling setupAnim, so it kept whatever bend the last third-person player drawn had left. FirstPersonHandMixin clears it in renderHand.
Tester
A new hold animation (arm forward, forearm folded up).
The gametest now takes shots holding a sword, and one in first person with an empty hand.
Testing
Compiles on all 8 versions. I checked the mixin target signatures against each version's classes.
Held items: checked by hand in game.
First-person fix: tested in the gametest on 1.21.11. With hold playing, the first-person arm was bent without the fix and straight with it.
## Held items
Items were drawn at the hand of the unbent arm. `PlayerModelMixin` hooks the end of `PlayerModel.translateToHand` and adds one more rigid transform (`BendTransforms.attachAt`). It's the same move the ring at the hand makes, so the item stays in the fist and turns with the forearm, the way the end of the sleeve does.
The hook is on `PlayerModel` because it overrides `translateToHand` (to handle slim arms) and never calls `HumanoidModel`'s version. This needed two Stonecutter branches:
- the class moved to `model.player` in 1.21.11
- the method gained a render-state parameter in 1.21.9
## First-person arm
The first-person arm is drawn from the same shared model without calling `setupAnim`, so it kept whatever bend the last third-person player drawn had left. `FirstPersonHandMixin` clears it in `renderHand`.
## Tester
- A new `hold` animation (arm forward, forearm folded up).
- The gametest now takes shots holding a sword, and one in first person with an empty hand.
## Testing
- Compiles on all 8 versions. I checked the mixin target signatures against each version's classes.
- **Held items:** checked by hand in game.
- **First-person fix:** tested in the gametest on 1.21.11. With `hold` playing, the first-person arm was bent without the fix and straight with it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- PlayerModelMixin: after translateToHand, move the item from the hand of
the straight arm to the hand of the bent one (BendTransforms.attachAt,
the same rigid move as the ring at the hand). PlayerModel overrides
translateToHand for slim arms without calling HumanoidModel's, so the
hook has to be on PlayerModel.
- FirstPersonHandMixin: the first-person arm is drawn from the shared
model without setupAnim, so clear any bend left by the last
third-person player.
- LimbBend.start()/end() getters.
- testmod: a hold animation, and gametest shots holding a sword and in
first person.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Held items
Items were drawn at the hand of the unbent arm.
PlayerModelMixinhooks the end ofPlayerModel.translateToHandand adds one more rigid transform (BendTransforms.attachAt). It's the same move the ring at the hand makes, so the item stays in the fist and turns with the forearm, the way the end of the sleeve does.The hook is on
PlayerModelbecause it overridestranslateToHand(to handle slim arms) and never callsHumanoidModel's version. This needed two Stonecutter branches:model.playerin 1.21.11First-person arm
The first-person arm is drawn from the same shared model without calling
setupAnim, so it kept whatever bend the last third-person player drawn had left.FirstPersonHandMixinclears it inrenderHand.Tester
holdanimation (arm forward, forearm folded up).Testing
holdplaying, the first-person arm was bent without the fix and straight with it.🤖 Generated with Claude Code