[PR #3735] [MERGED] Zombified piglin: it runs Zombie.registerGoals too, with the turtle egg goal #5180

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3735
Author: @xFedeT
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: fix/zombified-piglin-turtle-egg-goal


📝 Commits (6)

  • 0b6c48b Zombified piglin: it runs Zombie.registerGoals too, with the turtle egg goal
  • 4464c5d Merge remote-tracking branch 'origin/main' into upd-3735
  • 30da32b Merge main into fix/zombified-piglin-turtle-egg-goal (resolve tools/test_mob_ai_parity.py)
  • 2be6cda Merge main into fix/zombified-piglin-turtle-egg-goal (resolve tools/test_mob_ai_parity.py)
  • b5ec913 Merge remote-tracking branch 'origin/main' into upd-3735
  • 05114a3 Merge remote-tracking branch 'origin/main' into upd-3735

📊 Changes

2 files changed (+4 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/mobs/undead.rs (+2 -0)
📝 tools/test_mob_ai_parity.py (+2 -0)

📄 Description

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

Fixes #3755.

Found by running the mob_ai player scenario over species it did not cover. Checked: no open PR touches the zombified piglin's goals.

What and why

ZombifiedPiglin extends Zombie and overrides only addBehaviourGoals, so Zombie.registerGoals still adds ZombieAttackTurtleEggGoal (priority 4, a RemoveBlockGoal) and the two look goals. Horizon's zombified piglin lacked the turtle egg goal: its MoveToBlockGoal.nextStartTick draw never happened and the random stream drifted from vanilla's at the second tick. It also means a zombified piglin now tramples turtle eggs, as vanilla's does.

Change

mobs/undead.rs: AttackTurtleEgg for ZombifiedPiglin, as for the other zombies. tools/test_mob_ai_parity.py: zombified_piglin_player (120 ticks, a player 7 blocks away).

Vanilla reference

Zombie.registerGoals, Zombie.ZombieAttackTurtleEggGoal, ZombifiedPiglin.addBehaviourGoals, RemoveBlockGoal, MoveToBlockGoal.nextStartTick.

Testing

Before: the scenario diverges at tick 1 (vanilla draws 6 times, Horizon 5). After: 1/1, 121/121 mob-ticks. python3 tools/parity.py --fresh mob_ai: pass.

pr_ready --quick results follow in a comment.

🤖 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/3735 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/zombified-piglin-turtle-egg-goal` --- ### 📝 Commits (6) - [`0b6c48b`](https://github.com/horizon-rust/horizon/commit/0b6c48be77cf14d37e84946cd4a2f71221c17efd) Zombified piglin: it runs Zombie.registerGoals too, with the turtle egg goal - [`4464c5d`](https://github.com/horizon-rust/horizon/commit/4464c5d64aa06ca3beaee8e5640d738b59067429) Merge remote-tracking branch 'origin/main' into upd-3735 - [`30da32b`](https://github.com/horizon-rust/horizon/commit/30da32b83c88ef24428d976d43db8b997d4d9fbf) Merge main into fix/zombified-piglin-turtle-egg-goal (resolve tools/test_mob_ai_parity.py) - [`2be6cda`](https://github.com/horizon-rust/horizon/commit/2be6cda974909bc354f7c03f4b1bd46fa809f0f9) Merge main into fix/zombified-piglin-turtle-egg-goal (resolve tools/test_mob_ai_parity.py) - [`b5ec913`](https://github.com/horizon-rust/horizon/commit/b5ec91342e2890559e12f024417339cfabd697ce) Merge remote-tracking branch 'origin/main' into upd-3735 - [`05114a3`](https://github.com/horizon-rust/horizon/commit/05114a3673bf6456fea7ce6a82c681fd75b5c752) Merge remote-tracking branch 'origin/main' into upd-3735 ### 📊 Changes **2 files changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/undead.rs` (+2 -0) 📝 `tools/test_mob_ai_parity.py` (+2 -0) </details> ### 📄 Description > 🤖 Opened by Federico's AI agent (Claude), not by Federico himself. Fixes #3755. Found by running the `mob_ai` player scenario over species it did not cover. Checked: no open PR touches the zombified piglin's goals. ## What and why `ZombifiedPiglin extends Zombie` and overrides only `addBehaviourGoals`, so `Zombie.registerGoals` still adds `ZombieAttackTurtleEggGoal` (priority 4, a `RemoveBlockGoal`) and the two look goals. Horizon's zombified piglin lacked the turtle egg goal: its `MoveToBlockGoal.nextStartTick` draw never happened and the random stream drifted from vanilla's at the second tick. It also means a zombified piglin now tramples turtle eggs, as vanilla's does. ## Change `mobs/undead.rs`: `AttackTurtleEgg` for `ZombifiedPiglin`, as for the other zombies. `tools/test_mob_ai_parity.py`: `zombified_piglin_player` (120 ticks, a player 7 blocks away). ## Vanilla reference `Zombie.registerGoals`, `Zombie.ZombieAttackTurtleEggGoal`, `ZombifiedPiglin.addBehaviourGoals`, `RemoveBlockGoal`, `MoveToBlockGoal.nextStartTick`. ## Testing Before: the scenario diverges at tick 1 (vanilla draws 6 times, Horizon 5). After: `1/1`, `121/121` mob-ticks. `python3 tools/parity.py --fresh mob_ai`: pass. `pr_ready --quick` results follow in a comment. 🤖 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:10:47 +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#5180
No description provided.