[PR #2539] [MERGED] Let frogs croak, shoot their tongue at small slimes and idle-swim #4409

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

📋 Pull Request Information

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

Base: main ← Head: fix/frog-croak-tongue


📝 Commits (10+)

  • 57e8de0 Send the drowning entity event (67) and draw the bubbles on clients
  • 6887331 Freeze mobs in powder snow and shake frozen mobs and cold striders
  • a45d0de Server-thread clients animate warden, sniffer, breeze, camel and shulker
  • 25c53cc Server-thread clients animate ravager, hoglin, iron golem, creaking, vex, allay, axolotl, guardian, copper golem and strider
  • 11e1ff1 Let armadillos roll up when scared, peek out and take less damage as a ball
  • 04b0b9a Let frogs croak, shoot their tongue at small slimes and idle-swim
  • 909f15b Count the warden tendril and heart animations down again
  • 5435eb0 Send a cold strider's shiver at index 19
  • ef0ea5d Merge main into fix/drowning-bubbles
  • 6c769f3 Merge main into fix/server-mob-animation-sync

📊 Changes

33 files changed (+1672 additions, -109 deletions)

View changed files

📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+2 -0)
📝 crates/horizon-client/src/game.rs (+5 -18)
📝 crates/horizon-client/src/game/combat.rs (+42 -1)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+15 -0)
📝 crates/horizon-client/src/game/lan.rs (+153 -1)
📝 crates/horizon-client/src/game/lan_actions.rs (+9 -0)
📝 crates/horizon-client/src/game/lan_mobs.rs (+2 -0)
📝 crates/horizon-client/src/game/remote.rs (+64 -0)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+50 -1)
📝 crates/horizon-client/src/mobs.rs (+47 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+72 -15)
📝 crates/horizon-client/src/mobs/allay.rs (+5 -0)
➕ crates/horizon-client/src/mobs/armadillo.rs (+407 -0)
📝 crates/horizon-client/src/mobs/body_anim.rs (+1 -1)
📝 crates/horizon-client/src/mobs/breeze.rs (+22 -0)
📝 crates/horizon-client/src/mobs/camel.rs (+45 -4)
📝 crates/horizon-client/src/mobs/copper_golem.rs (+12 -2)
📝 crates/horizon-client/src/mobs/creaking.rs (+49 -21)
➕ crates/horizon-client/src/mobs/frog.rs (+312 -0)

...and 13 more files

📄 Description

What and why

Frogs had no croak, tongue or idle swim, so FROG_CROAK, FROG_TONGUE, FROG_IDLE_WATER and the croaking_body part never showed. This builds on #2528 (pose sync and the client tick).

  • Croak: pose CROAKING for 60 ticks, then STANDING. The idle RunOne weights croak 3 against stroll 1, so an idle frog croaks in three of four picks; the stroll goal of a frog now has no extra delay so the other pick follows at once. The croak sound is the ambient sound, which already played.
  • ShootTongue: the attackables sensor (every 20 ticks, within 10 blocks, in sight, not an unreachable target) finds a slime or magma cube of size 1; the frog walks up at speed 2, shoots at under 1.75 blocks (pose USING_TONGUE, tongue sound, the target is drawn in), eats after 6 ticks (eat sound, doHurtTarget) and gives up after 100 ticks. A magma cube killed this way drops the froglight of the frog's variant through the existing loot table. Unreachable targets are kept for 100 ticks (5 at most).
  • Poses are synced as DATA_POSE and the tongue target as DATA_TONGUE_TARGET_ID (index 19). The client starts jump, croak and tongue states when the pose changes and runs the swim idle (Frog.tick).

Not included: the long jump (LongJumpToRandomPos) and the frog's other brain behaviours (laying frogspawn, finding land); the pose id and animation state for the jump are ready for it. The tongue pull adds to the target's velocity instead of setting it.

Vanilla reference

Croak.java, ShootTongue.java, FrogAi.java (idle RunOne, tongue activity), FrogAttackablesSensor.java, Frog.java (tick, onSyncedDataUpdated, canEat), FrogModel.setupAnim, loot_table/entities/magma_cube.json.

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/2539 **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/frog-croak-tongue` --- ### 📝 Commits (10+) - [`57e8de0`](https://github.com/horizon-rust/horizon/commit/57e8de0007d63eee598d96c3f9a305659f39327d) Send the drowning entity event (67) and draw the bubbles on clients - [`6887331`](https://github.com/horizon-rust/horizon/commit/688733132d7e105312337bb21cf8a96ee441ba33) Freeze mobs in powder snow and shake frozen mobs and cold striders - [`a45d0de`](https://github.com/horizon-rust/horizon/commit/a45d0de43eef252c6c0b45fad21e2e1bf70bf7bb) Server-thread clients animate warden, sniffer, breeze, camel and shulker - [`25c53cc`](https://github.com/horizon-rust/horizon/commit/25c53cc80330575cf822d2718ca9a0c4afbc3587) Server-thread clients animate ravager, hoglin, iron golem, creaking, vex, allay, axolotl, guardian, copper golem and strider - [`11e1ff1`](https://github.com/horizon-rust/horizon/commit/11e1ff12d0c516f3300c7919babfd4f66fc15131) Let armadillos roll up when scared, peek out and take less damage as a ball - [`04b0b9a`](https://github.com/horizon-rust/horizon/commit/04b0b9aed5eb24f99bf88185560238bd40330bf2) Let frogs croak, shoot their tongue at small slimes and idle-swim - [`909f15b`](https://github.com/horizon-rust/horizon/commit/909f15b90979c4339575e4011c37f2d0588f3464) Count the warden tendril and heart animations down again - [`5435eb0`](https://github.com/horizon-rust/horizon/commit/5435eb0f17d6f655604ba9cec75a6d2a829ad0fa) Send a cold strider's shiver at index 19 - [`ef0ea5d`](https://github.com/horizon-rust/horizon/commit/ef0ea5daad19c6b79e58751de28341b7a761421b) Merge main into fix/drowning-bubbles - [`6c769f3`](https://github.com/horizon-rust/horizon/commit/6c769f38aeb6eeefbb29fee28d68e882d26e65c9) Merge main into fix/server-mob-animation-sync ### 📊 Changes **33 files changed** (+1672 additions, -109 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+2 -0) 📝 `crates/horizon-client/src/game.rs` (+5 -18) 📝 `crates/horizon-client/src/game/combat.rs` (+42 -1) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+15 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+153 -1) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+9 -0) 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+2 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+64 -0) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+50 -1) 📝 `crates/horizon-client/src/mobs.rs` (+47 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+72 -15) 📝 `crates/horizon-client/src/mobs/allay.rs` (+5 -0) ➕ `crates/horizon-client/src/mobs/armadillo.rs` (+407 -0) 📝 `crates/horizon-client/src/mobs/body_anim.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/breeze.rs` (+22 -0) 📝 `crates/horizon-client/src/mobs/camel.rs` (+45 -4) 📝 `crates/horizon-client/src/mobs/copper_golem.rs` (+12 -2) 📝 `crates/horizon-client/src/mobs/creaking.rs` (+49 -21) ➕ `crates/horizon-client/src/mobs/frog.rs` (+312 -0) _...and 13 more files_ </details> ### 📄 Description ## What and why Frogs had no croak, tongue or idle swim, so `FROG_CROAK`, `FROG_TONGUE`, `FROG_IDLE_WATER` and the `croaking_body` part never showed. This builds on #2528 (pose sync and the client tick). - `Croak`: pose CROAKING for 60 ticks, then STANDING. The idle `RunOne` weights croak 3 against stroll 1, so an idle frog croaks in three of four picks; the stroll goal of a frog now has no extra delay so the other pick follows at once. The croak sound is the ambient sound, which already played. - `ShootTongue`: the attackables sensor (every 20 ticks, within 10 blocks, in sight, not an unreachable target) finds a slime or magma cube of size 1; the frog walks up at speed 2, shoots at under 1.75 blocks (pose USING_TONGUE, tongue sound, the target is drawn in), eats after 6 ticks (eat sound, `doHurtTarget`) and gives up after 100 ticks. A magma cube killed this way drops the froglight of the frog's variant through the existing loot table. Unreachable targets are kept for 100 ticks (5 at most). - Poses are synced as `DATA_POSE` and the tongue target as `DATA_TONGUE_TARGET_ID` (index 19). The client starts jump, croak and tongue states when the pose changes and runs the swim idle (`Frog.tick`). Not included: the long jump (`LongJumpToRandomPos`) and the frog's other brain behaviours (laying frogspawn, finding land); the pose id and animation state for the jump are ready for it. The tongue pull adds to the target's velocity instead of setting it. ## Vanilla reference `Croak.java`, `ShootTongue.java`, `FrogAi.java` (idle `RunOne`, tongue activity), `FrogAttackablesSensor.java`, `Frog.java` (`tick`, `onSyncedDataUpdated`, `canEat`), `FrogModel.setupAnim`, `loot_table/entities/magma_cube.json`. ## 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:16:56 +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#4409
No description provided.