[PR #2852] [MERGED] A hit rolls the armadillo up into a ball (fixes #2759) #4655

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2852
Author: @levzzz5154
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/armadillo-roll-ball


📝 Commits (2)

  • 3c7942d Test that a hit rolls the armadillo up into a ball
  • a7d0586 Merge upstream/main into fix/armadillo-roll-ball

📊 Changes

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

View changed files

📝 crates/horizon-client/src/mobs/armadillo.rs (+40 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself.

What and why

An armadillo hit by a player never curled up: the report in #2759 says it does not react when it is attacked or run over.

The roll itself is on main now (PR #2535): Armadillo.actuallyHurt rolls the armadillo up, Armadillo.rollUp plays entity.armadillo.roll and switches the state to ROLLING, and ArmadilloState.shouldHideInShell then shows the shell instead of the armadillo. Nothing held that in place, so this pull request adds the missing test: it drives the hurt reaction and the armadillo's tick, and pins the vanilla's behaviour - the hit rolls the armadillo up, the roll plays its sound and the model shows the shell.

Fixes #2759

Vanilla reference

  • net.minecraft.world.entity.animal.armadillo.Armadillo.actuallyHurt - a hit by a living thing sets the brain's DANGER_DETECTED_RECENTLY for 80 ticks and, when it can stay rolled up, rolls it up; a hit by fire and the like unrolls it.
  • net.minecraft.world.entity.animal.armadillo.Armadillo.rollUp - the sound entity.armadillo.roll and the ROLLING state.
  • net.minecraft.world.entity.animal.armadillo.Armadillo.ArmadilloState.shouldHideInShell - the shell shows once the ROLLING state is more than five ticks old; the SCARED state always, the UNROLLING state until it is 26 ticks old.
  • net.minecraft.world.entity.animal.armadillo.Armadillo.canStayRolledUp - not panicking, not in liquid, not leashed, not a passenger and not a vehicle.
  • net.minecraft.client.model.animal.armadillo.ArmadilloModel.setupAnim - isHidingInShell skips the body, hides the legs and the tail and shows the cube.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on cachyos-x8664, against upstream/main at 58beb9832, 3 min 43 s)

Check Result
Scope ✅ 1 files, +40 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 336 passed (19 s)
rustfmt ✅ (4 s)
clippy ✅ (50 s)
tests: horizon-client ✅ 1330 passed (1 min 47 s)
doc tests ✅ 0 passed (40 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 ➖ 14 affected, to run in CI (--quick): command_exec, forced_end, lan_integration, save_roundtrip, server_dimension_players, server_dragon, server_knockback, server_ops_feedback, server_player_sculk, server_resource_pack, spawn_loot, user_cache and 2 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)
  • cargo test --locked -p horizon-client --lib -- armadillo -> 1 passed (mobs::armadillo::tests::a_hit_rolls_it_up_into_a_ball).
  • Negative control: with the roll-up taken out of the hurt reaction, the new test fails - left: 0 (still IDLE) and right: 1 (ROLLING).
  • python3 tools/test_entity_model_parity.py --filter armadillo -> 74 cases compared over 2 layers ... entity model parity ok: the armadillo's model, the shell included, is vanilla's.
  • cargo fmt -p horizon-client -> no changes.

🤖 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/2852 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/armadillo-roll-ball` --- ### 📝 Commits (2) - [`3c7942d`](https://github.com/horizon-rust/horizon/commit/3c7942d2bd53e2ae6508b851b18b0025c73d18a7) Test that a hit rolls the armadillo up into a ball - [`a7d0586`](https://github.com/horizon-rust/horizon/commit/a7d0586d950149f7c98affa48bbb7195ef9480bf) Merge upstream/main into fix/armadillo-roll-ball ### 📊 Changes **1 file changed** (+40 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/armadillo.rs` (+40 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself. ## What and why An armadillo hit by a player never curled up: the report in #2759 says it does not react when it is attacked or run over. The roll itself is on `main` now (PR #2535): `Armadillo.actuallyHurt` rolls the armadillo up, `Armadillo.rollUp` plays `entity.armadillo.roll` and switches the state to ROLLING, and `ArmadilloState.shouldHideInShell` then shows the shell instead of the armadillo. Nothing held that in place, so this pull request adds the missing test: it drives the hurt reaction and the armadillo's tick, and pins the vanilla's behaviour - the hit rolls the armadillo up, the roll plays its sound and the model shows the shell. Fixes #2759 ## Vanilla reference - `net.minecraft.world.entity.animal.armadillo.Armadillo.actuallyHurt` - a hit by a living thing sets the brain's `DANGER_DETECTED_RECENTLY` for 80 ticks and, when it can stay rolled up, rolls it up; a hit by fire and the like unrolls it. - `net.minecraft.world.entity.animal.armadillo.Armadillo.rollUp` - the sound `entity.armadillo.roll` and the `ROLLING` state. - `net.minecraft.world.entity.animal.armadillo.Armadillo.ArmadilloState.shouldHideInShell` - the shell shows once the `ROLLING` state is more than five ticks old; the `SCARED` state always, the `UNROLLING` state until it is 26 ticks old. - `net.minecraft.world.entity.animal.armadillo.Armadillo.canStayRolledUp` - not panicking, not in liquid, not leashed, not a passenger and not a vehicle. - `net.minecraft.client.model.animal.armadillo.ArmadilloModel.setupAnim` - `isHidingInShell` skips the body, hides the legs and the tail and shows the cube. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on cachyos-x8664, against upstream/main at 58beb9832, 3 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +40 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 336 passed (19 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (50 s) | | tests: horizon-client | ✅ 1330 passed (1 min 47 s) | | doc tests | ✅ 0 passed (40 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 | ➖ 14 affected, to run in CI (--quick): command_exec, forced_end, lan_integration, save_roundtrip, server_dimension_players, server_dragon, server_knockback, server_ops_feedback, server_player_sculk, server_resource_pack, spawn_loot, user_cache and 2 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | - `cargo test --locked -p horizon-client --lib -- armadillo` -> `1 passed` (`mobs::armadillo::tests::a_hit_rolls_it_up_into_a_ball`). - Negative control: with the roll-up taken out of the hurt reaction, the new test fails - `left: 0` (still IDLE) and `right: 1` (ROLLING). - `python3 tools/test_entity_model_parity.py --filter armadillo` -> `74 cases compared over 2 layers` ... `entity model parity ok`: the armadillo's model, the shell included, is vanilla's. - `cargo fmt -p horizon-client` -> no changes. 🤖 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:06:58 +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#4655
No description provided.