[PR #2271] [MERGED] Frogs walk at vanilla speed (smooth swimming move control) #4163

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

📋 Pull Request Information

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

Base: main ← Head: fix/2213-frog-speed


📝 Commits (2)

  • 26626e8 Give frogs vanilla's smooth swimming move control
  • d8b49e8 Merge main into fix/2213-frog-speed

📊 Changes

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

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+12 -0)

📄 Description

What and why

Frogs moved far too fast: they shot across the ground, looked like they teleported and sometimes flew off
edges.

A frog's movement speed attribute is 1.0. Vanilla keeps it at a walking pace with its move control,
SmoothSwimmingMoveControl(85, 10, 0.02, 0.1, true), which scales the speed by 0.1 on land and 0.02 in
water. Horizon gave frogs the plain ground move control, so they walked at the full 1.0, ten times too fast.
Frogs now use the smooth swimming control with vanilla's values (Horizon already has it for axolotls and
dolphins).

Checked with horizon-ctl on the server thread, a frog on flat grass at /tick rate 100, position sampled
60 times: the largest step between samples went from 6.2 blocks to 0.31.

Fixes #2213.

Vanilla reference

  • Frog(): this.moveControl = new SmoothSwimmingMoveControl<>(this, 85, 10, 0.02F, 0.1F, true).
  • Frog.createAttributes: MOVEMENT_SPEED 1.0.
  • SmoothSwimmingMoveControl.tick: setSpeed(speed * outsideWaterSpeedModifier * turningSpeedFactor) out of
    water, speed * inWaterSpeedModifier in water.

Self-check

cargo check -p horizon-client passes.


🔄 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/2271 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2213-frog-speed` --- ### 📝 Commits (2) - [`26626e8`](https://github.com/horizon-rust/horizon/commit/26626e8c2759f6cd7fef2535dd7ae915168af805) Give frogs vanilla's smooth swimming move control - [`d8b49e8`](https://github.com/horizon-rust/horizon/commit/d8b49e8697a9929abb44122fe667ed8a9f8221f2) Merge main into fix/2213-frog-speed ### 📊 Changes **1 file changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+12 -0) </details> ### 📄 Description ## What and why Frogs moved far too fast: they shot across the ground, looked like they teleported and sometimes flew off edges. A frog's movement speed attribute is 1.0. Vanilla keeps it at a walking pace with its move control, `SmoothSwimmingMoveControl(85, 10, 0.02, 0.1, true)`, which scales the speed by 0.1 on land and 0.02 in water. Horizon gave frogs the plain ground move control, so they walked at the full 1.0, ten times too fast. Frogs now use the smooth swimming control with vanilla's values (Horizon already has it for axolotls and dolphins). Checked with `horizon-ctl` on the server thread, a frog on flat grass at `/tick rate 100`, position sampled 60 times: the largest step between samples went from 6.2 blocks to 0.31. Fixes #2213. ## Vanilla reference - `Frog()`: `this.moveControl = new SmoothSwimmingMoveControl<>(this, 85, 10, 0.02F, 0.1F, true)`. - `Frog.createAttributes`: `MOVEMENT_SPEED 1.0`. - `SmoothSwimmingMoveControl.tick`: `setSpeed(speed * outsideWaterSpeedModifier * turningSpeedFactor)` out of water, `speed * inWaterSpeedModifier` in water. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:08 +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#4163
No description provided.