[PR #4206] [MERGED] Frogs walk their legs at vanilla's rate #5484

Closed
opened 2026-11-03 05:12:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4206
Author: @DenisHumen
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/frog-walk-anim


📝 Commits (1)

  • dcd8651 Frogs walk their legs at vanilla's rate

📊 Changes

2 files changed (+37 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/mobs/frog.rs (+35 -0)
📝 crates/horizon-client/src/mobs/living.rs (+2 -0)

📄 Description

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

What

Frogs now move their legs while walking. The walk animation speed for a frog uses vanilla's frog-specific rule instead of the generic one.

Why

Vanilla 26.3 Frog.updateWalkAnimation(float) overrides LivingEntity.updateWalkAnimation:

  • target = jumpAnimationState.isStarted() ? 0 : min(distance * 25, 1)
  • then walkAnimation.update(target, 0.4, isBaby() ? 3 : 1), same as the base

Horizon used the base rule (min(distance * 4, 1)) for frogs, so a frog's slow steps gave a walk speed about 6 times too small, and FrogModel.setupAnim's applyWalk(FROG_WALK, pos, speed, 1.5, 2.5) barely moved the legs. The model side (body_anim::frog) already matched FrogModel.setupAnim. Read with javap on the 26.3 client jar.

Checked

  • New unit test mobs::frog::tests::a_frog_walks_its_legs_at_the_vanilla_rate: a 0.02-block step gives a target of 0.5 (eased to 0.2), a 0.1-block step is capped at 1, and the target is 0 while the jump animation runs. It fails on upstream/main and passes with the fix.
  • cargo clippy -p horizon-client --all-targets -- -D warnings (with the three clippy 1.96 lints allowed) is clean for this change.
  • pr_ready on Windows: the clippy ❌ is the clippy 1.96 manual_range_contains lint in horizon-world/src/worldgen/aquifer/noise_based.rs. The one test failure is title::tests::each_world_preset_writes_its_own_generator, a known Windows-only failure (NotADirectory). Neither is related to this change. Parity harnesses weren't run here (tools/parity.py needs fcntl).

Fixes #2848

pr_ready (tools/pr_ready.py --quick --base upstream/main on DenisPC, against upstream/main at bd9b32587, 4 min 10 s)

Check Result
Scope ✅ 2 files, +37 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (1 min 13 s)
rustfmt ✅ (8 s)
clippy ❌ failed (20 s)
tests: horizon-client ❌ 727 passed, 1 failed (2 min 15 s)
doc tests ✅ 0 passed (6 s)
content root tests ➖ content root untouched
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)

🤖 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/4206 **Author:** [@DenisHumen](https://github.com/DenisHumen) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/frog-walk-anim` --- ### 📝 Commits (1) - [`dcd8651`](https://github.com/horizon-rust/horizon/commit/dcd86510f58a026d3614a4d061cc647e42781d49) Frogs walk their legs at vanilla's rate ### 📊 Changes **2 files changed** (+37 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/frog.rs` (+35 -0) 📝 `crates/horizon-client/src/mobs/living.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by DenisHumen's AI agent (Claude Code, Opus 5.5), not by DenisHumen personally. ## What Frogs now move their legs while walking. The walk animation speed for a frog uses vanilla's frog-specific rule instead of the generic one. ## Why Vanilla 26.3 `Frog.updateWalkAnimation(float)` overrides `LivingEntity.updateWalkAnimation`: - target = `jumpAnimationState.isStarted() ? 0 : min(distance * 25, 1)` - then `walkAnimation.update(target, 0.4, isBaby() ? 3 : 1)`, same as the base Horizon used the base rule (`min(distance * 4, 1)`) for frogs, so a frog's slow steps gave a walk speed about 6 times too small, and `FrogModel.setupAnim`'s `applyWalk(FROG_WALK, pos, speed, 1.5, 2.5)` barely moved the legs. The model side (`body_anim::frog`) already matched `FrogModel.setupAnim`. Read with javap on the 26.3 client jar. ## Checked - New unit test `mobs::frog::tests::a_frog_walks_its_legs_at_the_vanilla_rate`: a 0.02-block step gives a target of 0.5 (eased to 0.2), a 0.1-block step is capped at 1, and the target is 0 while the jump animation runs. It fails on upstream/main and passes with the fix. - `cargo clippy -p horizon-client --all-targets -- -D warnings` (with the three clippy 1.96 lints allowed) is clean for this change. - pr_ready on Windows: the clippy ❌ is the clippy 1.96 `manual_range_contains` lint in `horizon-world/src/worldgen/aquifer/noise_based.rs`. The one test failure is `title::tests::each_world_preset_writes_its_own_generator`, a known Windows-only failure (NotADirectory). Neither is related to this change. Parity harnesses weren't run here (`tools/parity.py` needs `fcntl`). Fixes #2848 **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DenisPC, against upstream/main at bd9b32587, 4 min 10 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +37 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (1 min 13 s) | | rustfmt | ✅ (8 s) | | clippy | ❌ failed (20 s) | | tests: horizon-client | ❌ 727 passed, 1 failed (2 min 15 s) | | doc tests | ✅ 0 passed (6 s) | | content root tests | ➖ content root untouched | | 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) | 🤖 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 05:12:54 +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#5484
No description provided.