[PR #6173] [MERGED] Animate worn Ender Dragon heads (wornHeadAnimationPos) #6696

Closed
opened 2026-11-03 06:25:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6173
Author: @Joansitoh
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/6111-dragon-head-anim


📝 Commits (3)

  • b0be23c Animate worn Ender Dragon heads like vanilla's wornHeadAnimationPos
  • c61ce64 Apply the baby walk scale to a worn head's vehicle position
  • f5161d9 Resolve the local player's mount and test the worn head's real vehicle lookup

📊 Changes

2 files changed (+79 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/mob_blocks.rs (+61 -1)
📝 crates/horizon-client/src/mobs/anim.rs (+18 -2)

📄 Description

🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally.

What

An Ender Dragon head worn by a player or mob never animated its jaw: head_item_geometry hardcoded animation: 0.0. It now passes the vanilla wornHeadAnimationPos. The armor-stand path is unchanged (vanilla has no walk animation there).

Vanilla reference

LivingEntityRenderer.extractRenderState sets wornHeadAnimationPos to the living vehicle's walkAnimation.position(partial) when riding a LivingEntity, else the wearer's own walkAnimationPos; CustomHeadLayer passes it to the skull. WalkAnimationState.position(partial) is (position - speed*(1-partial)) * scale (3 for babies). A shared anim::walk_position now serves both anim::state and the vehicle lookup. anim::state(..).pos already gives 0 for passengers/dead mobs.

How tested

  • New unit tests: a_worn_head_follows_the_living_vehicle (the real lookup with a real horse: own position, unknown/non-mob mount, passenger and dead wearer riding a living vehicle), walk_position_triples_for_babies.
  • The local player's synthetic mob has no mount, so its vehicle comes from self.riding; remote players and mobs use extra.mount.
  • pr_ready --quick on tiffany against upstream/main: rustfmt, clippy, Python tests, doc tests pass. horizon-client tests: 1197 passed, 1 failed: entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation (pre-existing: it fails identically on a clean upstream/main at 1bd24e404 with an airborne stand must fall, y=20; this diff doesn't touch that code).
  • No harness covers worn-head animation. Remaining affected harnesses: run by CI's parity job.

Fixes #6111

Suggested label: none

🤖 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/6173 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6111-dragon-head-anim` --- ### 📝 Commits (3) - [`b0be23c`](https://github.com/horizon-rust/horizon/commit/b0be23cd59a749aabb8491d7f22d7b54e612b8ba) Animate worn Ender Dragon heads like vanilla's wornHeadAnimationPos - [`c61ce64`](https://github.com/horizon-rust/horizon/commit/c61ce6401ea2b202095b3549fffd2a478062a304) Apply the baby walk scale to a worn head's vehicle position - [`f5161d9`](https://github.com/horizon-rust/horizon/commit/f5161d9ebaa2e2382276d25caeccd165705ca05a) Resolve the local player's mount and test the worn head's real vehicle lookup ### 📊 Changes **2 files changed** (+79 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/mob_blocks.rs` (+61 -1) 📝 `crates/horizon-client/src/mobs/anim.rs` (+18 -2) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What An Ender Dragon head worn by a player or mob never animated its jaw: `head_item_geometry` hardcoded `animation: 0.0`. It now passes the vanilla `wornHeadAnimationPos`. The armor-stand path is unchanged (vanilla has no walk animation there). ## Vanilla reference `LivingEntityRenderer.extractRenderState` sets `wornHeadAnimationPos` to the living vehicle's `walkAnimation.position(partial)` when riding a LivingEntity, else the wearer's own `walkAnimationPos`; `CustomHeadLayer` passes it to the skull. `WalkAnimationState.position(partial)` is `(position - speed*(1-partial)) * scale` (3 for babies). A shared `anim::walk_position` now serves both `anim::state` and the vehicle lookup. `anim::state(..).pos` already gives 0 for passengers/dead mobs. ## How tested - New unit tests: `a_worn_head_follows_the_living_vehicle` (the real lookup with a real horse: own position, unknown/non-mob mount, passenger and dead wearer riding a living vehicle), `walk_position_triples_for_babies`. - The local player's synthetic mob has no `mount`, so its vehicle comes from `self.riding`; remote players and mobs use `extra.mount`. - pr_ready --quick on tiffany against upstream/main: rustfmt, clippy, Python tests, doc tests pass. `horizon-client` tests: 1197 passed, 1 failed: `entities::armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation` (pre-existing: it fails identically on a clean `upstream/main` at 1bd24e404 with `an airborne stand must fall, y=20`; this diff doesn't touch that code). - No harness covers worn-head animation. Remaining affected harnesses: run by CI's parity job. Fixes #6111 Suggested label: none 🤖 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 06:25:02 +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#6696
No description provided.