[PR #7263] [MERGED] Fix animal growth and breeding cooldowns with NoAI #7450

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7263
Author: @TheMrZZ
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/7230-noai-age


📝 Commits (1)

  • 72b58bd Fix animal age clocks with NoAI

📊 Changes

4 files changed (+147 additions, -53 deletions)

View changed files

📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+4 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+133 -53)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMobAiOracle.java (+2 -0)
📝 tools/test_mob_ai_parity.py (+8 -0)

📄 Description

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

What and why

Animals with NoAI:1b now grow up and count down their breeding cooldown. Their age handling runs independently of AI goals and movement controls, preserving age locking, dimension changes, and species growth events such as a turtle's scute drop.

Fixes #7230.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

AgeableMob.aiStep, AgeableMob.canAgeUp, and Mob.serverAiStep. Official Java 26.3 controls confirm that both age signs advance toward zero with either AI mode; AgeLocked holds a baby's age while positive breeding cooldown still expires.

The mob-AI parity harness now records age and covers pig, cow, horse, and turtle with both age signs, both AI modes, and age locking (32 scenarios).

Other projects' code

None.

Self-check

The focused resource-backed regression passes with this change and fails without the NoAI age update (-2 remains -2 instead of advancing to -1). It covers all 32 combinations, stationary NoAI controls outside growth's dimension adjustment, and exactly one turtle growth loot event.

The small mob-world fixture was isolated for that focused run. Standard checks below use the repository's missing-resource skips. Full Java/Rust parity remains for CI.

pr_ready (tools/pr_ready.py --quick on a local runner, against origin/main at 0f0fa62dc, 3 min 42 s)

Check Result
Scope ✅ 4 files, +147 −53
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 612 passed (45 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 1 s)
tests: horizon-client-lib ✅ 1442 passed (54 s)
doc tests ✅ 0 passed (55 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Codex.


🔄 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/7263 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/7230-noai-age` --- ### 📝 Commits (1) - [`72b58bd`](https://github.com/horizon-rust/horizon/commit/72b58bd1129b6e99ecae51ebb1754677059335e3) Fix animal age clocks with NoAI ### 📊 Changes **4 files changed** (+147 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+4 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+133 -53) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMobAiOracle.java` (+2 -0) 📝 `tools/test_mob_ai_parity.py` (+8 -0) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why Animals with `NoAI:1b` now grow up and count down their breeding cooldown. Their age handling runs independently of AI goals and movement controls, preserving age locking, dimension changes, and species growth events such as a turtle's scute drop. Fixes #7230. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `AgeableMob.aiStep`, `AgeableMob.canAgeUp`, and `Mob.serverAiStep`. Official Java 26.3 controls confirm that both age signs advance toward zero with either AI mode; `AgeLocked` holds a baby's age while positive breeding cooldown still expires. The mob-AI parity harness now records age and covers pig, cow, horse, and turtle with both age signs, both AI modes, and age locking (32 scenarios). ## Other projects' code None. ## Self-check The focused resource-backed regression passes with this change and fails without the NoAI age update (`-2` remains `-2` instead of advancing to `-1`). It covers all 32 combinations, stationary NoAI controls outside growth's dimension adjustment, and exactly one turtle growth loot event. The small mob-world fixture was isolated for that focused run. Standard checks below use the repository's missing-resource skips. Full Java/Rust parity remains for CI. **pr_ready** (`tools/pr_ready.py --quick` on a local runner, against origin/main at 0f0fa62dc, 3 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +147 −53 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 612 passed (45 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 1 s) | | tests: horizon-client-lib | ✅ 1442 passed (54 s) | | doc tests | ✅ 0 passed (55 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:39:43 +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#7450
No description provided.