[PR #4226] [MERGED] Armadillos breed, follow spider eyes and their parents #5499

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

📋 Pull Request Information

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

Base: main ← Head: fix-3512-armadillo-breeding


📝 Commits (1)

  • 958522c Let armadillos breed, follow spider eyes and their parents

📊 Changes

1 file changed (+191 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs/armadillo.rs (+191 -1)

📄 Description

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

What and why

Armadillos took spider eyes and showed hearts, but two of them in love never made a baby. They also ignored a player holding spider eyes, and their babies never followed an adult. armadillo::register only added Float, the panic, the "rolled up" blocker, Stroll and the two look goals. It had nothing from vanilla's idle activity for love, temptation or following an adult.

This adds them as goals, matching ArmadilloAi.initIdleActivity:

  • Breed(1.0) for AnimalMakeLove(ARMADILLO, 1.0)
  • Tempt(1.25, armadillo_food) for FollowTemptation (speed 1.25). It stops 1 block away for a baby and 2 for an adult, like vanilla's closeEnough lambda. The age is read each tick, because goals are registered before a baby's age is set.
  • FollowParent(1.25) for BabyFollowAdult(UniformInt(5, 16), 1.25)

Each one is wrapped in a small Idle goal so it runs only in the IDLE activity. It does not run while ArmadilloAi.updateActivity picks PANIC (DANGER_DETECTED_RECENTLY present and not panicking), and it does not run while the armadillo is a ball (ArmadilloAi$1, the MoveToTargetSink that refuses to start when isScared). Rolling up still clears love, as Armadillo.rollUp does.

Part of #3512 (the ArmadilloAi.initIdleActivity row of the Animals list).

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

  • net.minecraft.world.entity.animal.armadillo.ArmadilloAi.initIdleActivity: AnimalMakeLove(EntityTypes.ARMADILLO, 1.0F, 1) at priority 1. At priority 2, RunOne(FollowTemptation(e -> 1.25F, e -> e.isBaby() ? 1.0 : 2.0), BabyFollowAdult.create(ADULT_FOLLOW_RANGE, 1.25F)).
  • ArmadilloAi.initScaredActivity / updateActivity: PANIC (requires DANGER_DETECTED_RECENTLY present and IS_PANICKING absent) wins over IDLE.
  • ArmadilloAi$1.checkExtraStartConditions: a scared armadillo does not walk.

No harness covers goal selection. The new unit tests in mobs/armadillo.rs use the real armadillo type from the extracted data:

  • two_armadillos_in_love_make_a_baby: two adults in love produce MobEvent::Breed, and the parent's age becomes 6000. Neither in the PANIC activity nor as a ball does it look for a mate. Once idle again, it does.
  • a_baby_armadillo_follows_an_adult: a baby 6 blocks from an adult runs FollowParent, but not as a ball.
  • a_tempted_baby_comes_closer_than_an_adult: the temptation stops 1 block away for a baby and 2 for an adult.

Self-check

tools/pr_ready.py does not run on Windows (it needs SIGHUP), so I ran the steps by hand:

  • cargo fmt --all -- --check: clean
  • cargo clippy -p horizon-client --all-targets -- -D warnings: clean
  • cargo test -p horizon-client --lib mobs::armadillo
    • with the fix: 5 passed; 0 failed
    • before (the new goals removed from register, tests kept): 3 passed; 2 failed
      • two_armadillos_in_love_make_a_baby panicked with "the pair breeds"
      • a_baby_armadillo_follows_an_adult panicked at assertion failed: baby.ai.goals.is_running("FollowParent")
  • In game (single player, server thread, --profile fast; same pen, seed, time and view in both builds). I fed two /summoned armadillos spider eyes:
    • before: hearts (14 heart particles), no baby after 11 s. Holding spider eyes in the pen, they did not come.
    • after: hearts, then a baby within 11 s, plus the breeding XP orb. Both adults walked up to the player holding spider eyes, and the baby followed an adult.
    • The 1 block stop for a tempted baby came after this in-game run. Only a_tempted_baby_comes_closer_than_an_adult covers it.

Screenshots

before: holding spider eyes, the armadillos keep wandering at the far side of the pen

after: they follow the spider eye to the player, and once fed they breed (the experience orb)

Before: two fed armadillos wander the pen, and no baby appears.
After: the same pen from the same spot, with a baby armadillo following one of the two parents.

🤖 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/4226 **Author:** [@d3grando](https://github.com/d3grando) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix-3512-armadillo-breeding` --- ### 📝 Commits (1) - [`958522c`](https://github.com/horizon-rust/horizon/commit/958522ce677ed001fd9ab61bd03ee14c73928b75) Let armadillos breed, follow spider eyes and their parents ### 📊 Changes **1 file changed** (+191 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/armadillo.rs` (+191 -1) </details> ### 📄 Description > 🤖 Opened by d3grando's AI agent (Claude Code, Claude Opus 5.5), not by d3grando themselves. ## What and why Armadillos took spider eyes and showed hearts, but two of them in love never made a baby. They also ignored a player holding spider eyes, and their babies never followed an adult. `armadillo::register` only added Float, the panic, the "rolled up" blocker, Stroll and the two look goals. It had nothing from vanilla's idle activity for love, temptation or following an adult. This adds them as goals, matching `ArmadilloAi.initIdleActivity`: - `Breed(1.0)` for `AnimalMakeLove(ARMADILLO, 1.0)` - `Tempt(1.25, armadillo_food)` for `FollowTemptation` (speed 1.25). It stops 1 block away for a baby and 2 for an adult, like vanilla's `closeEnough` lambda. The age is read each tick, because goals are registered before a baby's age is set. - `FollowParent(1.25)` for `BabyFollowAdult(UniformInt(5, 16), 1.25)` Each one is wrapped in a small `Idle` goal so it runs only in the IDLE activity. It does not run while `ArmadilloAi.updateActivity` picks PANIC (`DANGER_DETECTED_RECENTLY` present and not panicking), and it does not run while the armadillo is a ball (`ArmadilloAi$1`, the `MoveToTargetSink` that refuses to start when `isScared`). Rolling up still clears love, as `Armadillo.rollUp` does. Part of #3512 (the `ArmadilloAi.initIdleActivity` row of the Animals list). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference - `net.minecraft.world.entity.animal.armadillo.ArmadilloAi.initIdleActivity`: `AnimalMakeLove(EntityTypes.ARMADILLO, 1.0F, 1)` at priority 1. At priority 2, `RunOne(FollowTemptation(e -> 1.25F, e -> e.isBaby() ? 1.0 : 2.0), BabyFollowAdult.create(ADULT_FOLLOW_RANGE, 1.25F))`. - `ArmadilloAi.initScaredActivity` / `updateActivity`: PANIC (requires `DANGER_DETECTED_RECENTLY` present and `IS_PANICKING` absent) wins over IDLE. - `ArmadilloAi$1.checkExtraStartConditions`: a scared armadillo does not walk. No harness covers goal selection. The new unit tests in `mobs/armadillo.rs` use the real armadillo type from the extracted data: - `two_armadillos_in_love_make_a_baby`: two adults in love produce `MobEvent::Breed`, and the parent's age becomes 6000. Neither in the PANIC activity nor as a ball does it look for a mate. Once idle again, it does. - `a_baby_armadillo_follows_an_adult`: a baby 6 blocks from an adult runs `FollowParent`, but not as a ball. - `a_tempted_baby_comes_closer_than_an_adult`: the temptation stops 1 block away for a baby and 2 for an adult. ## Self-check `tools/pr_ready.py` does not run on Windows (it needs SIGHUP), so I ran the steps by hand: - `cargo fmt --all -- --check`: clean - `cargo clippy -p horizon-client --all-targets -- -D warnings`: clean - `cargo test -p horizon-client --lib mobs::armadillo` - with the fix: `5 passed; 0 failed` - before (the new goals removed from `register`, tests kept): `3 passed; 2 failed` - `two_armadillos_in_love_make_a_baby` panicked with "the pair breeds" - `a_baby_armadillo_follows_an_adult` panicked at `assertion failed: baby.ai.goals.is_running("FollowParent")` - In game (single player, server thread, `--profile fast`; same pen, seed, time and view in both builds). I fed two `/summon`ed armadillos spider eyes: - before: hearts (14 heart particles), no baby after 11 s. Holding spider eyes in the pen, they did not come. - after: hearts, then a baby within 11 s, plus the breeding XP orb. Both adults walked up to the player holding spider eyes, and the baby followed an adult. - The 1 block stop for a tempted baby came after this in-game run. Only `a_tempted_baby_comes_closer_than_an_adult` covers it. ## Screenshots ![before: holding spider eyes, the armadillos keep wandering at the far side of the pen](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/3512-armadillo-breeding-1.png) ![after: they follow the spider eye to the player, and once fed they breed (the experience orb)](https://raw.githubusercontent.com/d3grando/horizon/pr-assets/3512-armadillo-breeding-2.png) Before: two fed armadillos wander the pen, and no baby appears. After: the same pen from the same spot, with a baby armadillo following one of the two parents. 🤖 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:13:00 +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#5499
No description provided.