[PR #2003] [MERGED] Bats flap their wings on server clients #3928

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2003
Author: @rdbtCVS
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/bat-wing-animation-2000


📝 Commits (1)

  • 15d99a6 Start bat animation clocks on server clients

📊 Changes

7 files changed (+140 additions, -11 deletions)

View changed files

📝 crates/horizon-client/examples/probe/entity_anim_fixture.rs (+17 -9)
📝 crates/horizon-client/src/game/lan.rs (+7 -0)
📝 crates/horizon-client/src/game/remote.rs (+3 -0)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+70 -1)
📝 crates/horizon-client/src/mobs/bat.rs (+4 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAnimOracle.java (+31 -1)
📝 tools/test_entity_model_parity.py (+8 -0)

📄 Description

🤖 Opened by rdbt's AI agent (OpenCode, GPT-6.1 Sol), not by rdbt himself.

What and why

Fixes #2000.

Server clients (including default singleplayer) incremented bat age without starting either animation clock, leaving the wings static. They also ignored the bat's resting metadata.

  • Share Bat.setupAnimationStates between the existing in-frame tick and the remote visual tick.
  • Apply vanilla's flying client default and synced resting bit; send that bit from Horizon's server, including the reset to flying.
  • Add a resource-independent regression for continuous wing motion, resting/takeoff transitions, flag masking and motion preservation. Extend the existing entity-model harness with bat flag histories for both tick paths and fractional render times.

Vanilla reference

Pinned Minecraft Java Edition 26.3, inspected with javap -c -p against the imported client jar (SHA-1 e877b6a07acd633fb3bb475002175cec036e7b87):

  • net.minecraft.world.entity.ambient.Bat: constructor, defineSynchedData, isResting, tick, setupAnimationStates.
  • net.minecraft.client.renderer.entity.BatRenderer.extractRenderState: copies the flying/resting clocks into the render state.
  • net.minecraft.client.model.ambient.BatModel.setupAnim: applies those clocks to the two keyframe animations.

Harness: tools/test_entity_model_parity.py, with VanillaEntityAnimOracle invoking the shipped bat's animation-state setup and the Rust probe exercising the shared visual update and in-frame tick.

Self-check

python3 tools/pr_ready.py --quick exited 0. The updated Java oracle also compiled successfully with javac --release 25. Parity execution is left to CI.

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 9d07d5a3e, 2 min 47 s)

Check Result
Scope ✅ 7 files, +140 −11
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 303 passed (30 s)
rustfmt ✅ (5 s)
clippy ✅ (45 s)
tests: horizon-client ✅ 1265 passed (1 min 23 s)
doc tests ✅ 0 passed (4 s)
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)

Screenshots

No game capture was taken. The regression compares wing poses at consecutive fractional render times; the parity extension checks them against vanilla's model.

Maintainer edits are enabled.

🤖 Generated with OpenCode (GPT-6.1 Sol).


🔄 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/2003 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/bat-wing-animation-2000` --- ### 📝 Commits (1) - [`15d99a6`](https://github.com/horizon-rust/horizon/commit/15d99a6856190bc6fe9447a7b5990a9a55a59192) Start bat animation clocks on server clients ### 📊 Changes **7 files changed** (+140 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/entity_anim_fixture.rs` (+17 -9) 📝 `crates/horizon-client/src/game/lan.rs` (+7 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+3 -0) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+70 -1) 📝 `crates/horizon-client/src/mobs/bat.rs` (+4 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAnimOracle.java` (+31 -1) 📝 `tools/test_entity_model_parity.py` (+8 -0) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (OpenCode, GPT-6.1 Sol), not by rdbt himself. ## What and why Fixes #2000. Server clients (including default singleplayer) incremented bat age without starting either animation clock, leaving the wings static. They also ignored the bat's resting metadata. - Share `Bat.setupAnimationStates` between the existing in-frame tick and the remote visual tick. - Apply vanilla's flying client default and synced resting bit; send that bit from Horizon's server, including the reset to flying. - Add a resource-independent regression for continuous wing motion, resting/takeoff transitions, flag masking and motion preservation. Extend the existing entity-model harness with bat flag histories for both tick paths and fractional render times. ## Vanilla reference Pinned Minecraft Java Edition 26.3, inspected with `javap -c -p` against the imported client jar (SHA-1 `e877b6a07acd633fb3bb475002175cec036e7b87`): - `net.minecraft.world.entity.ambient.Bat`: constructor, `defineSynchedData`, `isResting`, `tick`, `setupAnimationStates`. - `net.minecraft.client.renderer.entity.BatRenderer.extractRenderState`: copies the flying/resting clocks into the render state. - `net.minecraft.client.model.ambient.BatModel.setupAnim`: applies those clocks to the two keyframe animations. Harness: `tools/test_entity_model_parity.py`, with `VanillaEntityAnimOracle` invoking the shipped bat's animation-state setup and the Rust probe exercising the shared visual update and in-frame tick. ## Self-check `python3 tools/pr_ready.py --quick` exited **0**. The updated Java oracle also compiled successfully with `javac --release 25`. Parity execution is left to CI. **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 9d07d5a3e, 2 min 47 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +140 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 303 passed (30 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (45 s) | | tests: horizon-client | ✅ 1265 passed (1 min 23 s) | | doc tests | ✅ 0 passed (4 s) | | 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) | ## Screenshots No game capture was taken. The regression compares wing poses at consecutive fractional render times; the parity extension checks them against vanilla's model. Maintainer edits are enabled. 🤖 Generated with [OpenCode](https://opencode.ai) (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:19 +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#3928
No description provided.