[PR #2535] [MERGED] Let armadillos roll up when scared, peek out and take less damage #4405

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/2535
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/armadillo-roll


📝 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
  • 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
  • 2e9827a Merge main into fix/server-mob-animation-sync-2

📊 Changes

32 files changed (+1337 additions, -95 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 (+144 -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 (+41 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+69 -1)
📝 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/goals.rs (+11 -1)

...and 12 more files

📄 Description

What and why

Armadillos only walked: they never curled up, so the model's shell, roll-up, roll-out and peek animations never showed. This builds on #2528 (its synced data and entity event path).

  • State machine IDLE, ROLLING, SCARED, UNROLLING, synced as ARMADILLO_STATE (index 18) and read on the client, which starts the roll-up, roll-out and peek animations and hides the body while in the shell.
  • The scare sensor (every 5 ticks): a sprinting or riding player within 7x2x7 blocks, any undead mob, or the last attacker. A hit by a living entity also curls it up and keeps the danger in mind for 80 ticks.
  • The ArmadilloBallUp timing: ROLLING to SCARED after 10 ticks, peek (entity event 64 and sound) at random times while danger is near, UNROLLING when the danger fades, and back to IDLE when it is gone.
  • A ball takes (damage - 1) / 2, makes the reduced hurt sound, has no ambient sound, takes no food, keeps its head on its body and does not move. Fire and cactus unroll it (#panic_environmental_causes).
  • PlayerView now carries sprinting and riding so the scare also works for a guest's player.

Scute dropping and brushing are separate PRs (#2226, #2234). The sensor scans the mobs around now, not the brain's 20-tick list of nearby entities.

Vanilla reference

Armadillo.java (isScaredBy, rollUp, rollOut, hurtServer, actuallyHurt, setupAnimationStates, handleEntityEvent, ArmadilloState), ArmadilloAi.java (ArmadilloBallUp, ArmadilloPanic, ARMADILLO_ROLLING_OUT), SensorType.ARMADILLO_SCARE_DETECTED (MobSensor), ArmadilloModel.setupAnim.

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/2535 **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/armadillo-roll` --- ### 📝 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 - [`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 - [`2e9827a`](https://github.com/horizon-rust/horizon/commit/2e9827a2591c8beb6f8c5549775e9cd0614b34a1) Merge main into fix/server-mob-animation-sync-2 ### 📊 Changes **32 files changed** (+1337 additions, -95 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` (+144 -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` (+41 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+69 -1) 📝 `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/goals.rs` (+11 -1) _...and 12 more files_ </details> ### 📄 Description ## What and why Armadillos only walked: they never curled up, so the model's shell, roll-up, roll-out and peek animations never showed. This builds on #2528 (its synced data and entity event path). - State machine IDLE, ROLLING, SCARED, UNROLLING, synced as `ARMADILLO_STATE` (index 18) and read on the client, which starts the roll-up, roll-out and peek animations and hides the body while in the shell. - The scare sensor (every 5 ticks): a sprinting or riding player within 7x2x7 blocks, any undead mob, or the last attacker. A hit by a living entity also curls it up and keeps the danger in mind for 80 ticks. - The `ArmadilloBallUp` timing: ROLLING to SCARED after 10 ticks, peek (entity event 64 and sound) at random times while danger is near, UNROLLING when the danger fades, and back to IDLE when it is gone. - A ball takes `(damage - 1) / 2`, makes the reduced hurt sound, has no ambient sound, takes no food, keeps its head on its body and does not move. Fire and cactus unroll it (`#panic_environmental_causes`). - `PlayerView` now carries `sprinting` and `riding` so the scare also works for a guest's player. Scute dropping and brushing are separate PRs (#2226, #2234). The sensor scans the mobs around now, not the brain's 20-tick list of nearby entities. ## Vanilla reference `Armadillo.java` (`isScaredBy`, `rollUp`, `rollOut`, `hurtServer`, `actuallyHurt`, `setupAnimationStates`, `handleEntityEvent`, `ArmadilloState`), `ArmadilloAi.java` (`ArmadilloBallUp`, `ArmadilloPanic`, `ARMADILLO_ROLLING_OUT`), `SensorType.ARMADILLO_SCARE_DETECTED` (`MobSensor`), `ArmadilloModel.setupAnim`. ## 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#4405
No description provided.