[PR #7881] Tick adult chicken egg timers with NoAI #7878

Open
opened 2026-11-03 07:25:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7881
Author: @TheMrZZ
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/h178-noai-chicken-eggs


📝 Commits (1)

  • f373144 Tick chicken egg timers with NoAI

📊 Changes

3 files changed (+176 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+3 -0)
📝 crates/horizon-client/src/mobs/farm.rs (+4 -0)
➕ tools/test_chicken_egg_parity.py (+169 -0)

📄 Description

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

What and why

Adult chickens now advance EggLayTime and lay eggs with NoAI:1b. Extract the existing egg-laying step and call it from the NoAI path as well as the normal chicken step. Baby and chicken-jockey exclusions remain in the shared step.

Fixes #7855.

The fresh dedicated-server fixture covers both AI modes for countdown, laying, baby, and jockey cases at ticks 0, 1, 3, and 10. Baseline 0c7b5b61a matched 120/128 observations; this change matches 128/128 with the same fixture and identical fresh Java reference records. It checks one subject at every boundary, one minecraft:egg after laying, the reset range, and another seven ticks of countdown.

Flap events (#7822), sounds, vibrations, and random-distribution parity are outside this change.

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

Official Java 26.3 Chicken.aiStep bytecode: on the server, a living adult non-jockey decrements eggTime, lays at zero, and resets with nextInt(6000) + 6000. This runs independently of NoAI's goal gate.

Regression: python3 tools/test_chicken_egg_parity.py (or pass --binary for a prebuilt server).

The ledger baseline comparison completed. Its existing entity_place drift moved from chicken_ai_step to the extracted chicken_egg_step; egg-laying game events remain outside this fix. The Entity.onGround call-reach reminder is unchanged.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick on local validation, against origin/main at 0c7b5b61a, 32 min 44 s)

Check Result
Scope ✅ 3 files, +176 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (2 min 29 s)
rustfmt ✅ (18 s)
clippy ✅ (4 min 17 s)
tests: horizon-client-lib ✅ 1482 passed (25 min 35 s)
doc tests ✅ 0 passed (4 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)

The Python suite includes one skipped test.

Focused real-server parity: 128/128. Full affected parity was not run (pr_ready.py --quick). No sound, vibration, or random-distribution parity claim.

🤖 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/7881 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/h178-noai-chicken-eggs` --- ### 📝 Commits (1) - [`f373144`](https://github.com/horizon-rust/horizon/commit/f373144fe5d5b467c9fa0a3422cf256f42fd6268) Tick chicken egg timers with NoAI ### 📊 Changes **3 files changed** (+176 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+3 -0) 📝 `crates/horizon-client/src/mobs/farm.rs` (+4 -0) ➕ `tools/test_chicken_egg_parity.py` (+169 -0) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why Adult chickens now advance `EggLayTime` and lay eggs with `NoAI:1b`. Extract the existing egg-laying step and call it from the NoAI path as well as the normal chicken step. Baby and chicken-jockey exclusions remain in the shared step. Fixes #7855. The fresh dedicated-server fixture covers both AI modes for countdown, laying, baby, and jockey cases at ticks 0, 1, 3, and 10. Baseline `0c7b5b61a` matched 120/128 observations; this change matches 128/128 with the same fixture and identical fresh Java reference records. It checks one subject at every boundary, one `minecraft:egg` after laying, the reset range, and another seven ticks of countdown. Flap events (#7822), sounds, vibrations, and random-distribution parity are outside this change. ## 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 Official Java 26.3 `Chicken.aiStep` bytecode: on the server, a living adult non-jockey decrements `eggTime`, lays at zero, and resets with `nextInt(6000) + 6000`. This runs independently of NoAI's goal gate. Regression: `python3 tools/test_chicken_egg_parity.py` (or pass `--binary` for a prebuilt server). The ledger baseline comparison completed. Its existing `entity_place` drift moved from `chicken_ai_step` to the extracted `chicken_egg_step`; egg-laying game events remain outside this fix. The `Entity.onGround` call-reach reminder is unchanged. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on local validation, against origin/main at 0c7b5b61a, 32 min 44 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +176 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (2 min 29 s) | | rustfmt | ✅ (18 s) | | clippy | ✅ (4 min 17 s) | | tests: horizon-client-lib | ✅ 1482 passed (25 min 35 s) | | doc tests | ✅ 0 passed (4 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) | The Python suite includes one skipped test. Focused real-server parity: **128/128**. Full affected parity was **not run** (`pr_ready.py --quick`). No sound, vibration, or random-distribution parity claim. 🤖 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>
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#7878
No description provided.