[PR #2684] [MERGED] Give turtles vanilla's goals: panic, tempt, go to water, travel and stroll #4538

Closed
opened 2026-11-03 04:17:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2684
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/turtle-goals


📝 Commits (3)

  • 28b72d4 Give turtles vanilla's goals: panic, tempt, go to water, travel and stroll
  • 966c380 Merge main into fix/turtle-goals
  • 18b3171 Merge main into fix/turtle-goals

📊 Changes

4 files changed (+256 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+5 -3)
📝 crates/horizon-client/src/mobs/goals.rs (+14 -4)
📝 crates/horizon-client/src/mobs/nav.rs (+5 -0)
📝 crates/horizon-client/src/mobs/turtle.rs (+232 -7)

📄 Description

What and why

Turtles ran the generic passive goals (an extra float goal, random look, panic at 1.25, look range 6) and only had the breed, lay egg and go home goals of their own. This gives them vanilla's list:

  • Panic at 1.2 that runs for water within 7 blocks first.
  • Tempt with seagrass (1.1).
  • Go to water: a turtle on land walks to water within 24 blocks (not while going home or carrying an egg).
  • Travel: a turtle in water swims towards a spot up to 512 blocks away, a leg at a time.
  • Random stroll every 100 ticks (not in water, going home or with an egg), look at players within 8, no float goal.

To make them work it also sets what Turtle gives its navigation: amphibious path finding, no water malus, closed doors and open doors blocked, vanilla's getWalkTargetValue (water and sand score 10), and water-only destinations while travelling. Going home now sets goingHome as vanilla does.

Not done here: the turtle move control and in-water travel (see #2565) and syncing the egg state to clients.

Vanilla reference

Turtle.registerGoals, TurtlePanicGoal, TurtleGoToWaterGoal, TurtleTravelGoal, TurtleRandomStrollGoal, TurtleGoHomeGoal, TurtlePathNavigation.isStableDestination, Turtle.getWalkTargetValue and PanicGoal.lookForWater.

Self-check

cargo check -p horizon-client passes.


🔄 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/2684 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/turtle-goals` --- ### 📝 Commits (3) - [`28b72d4`](https://github.com/horizon-rust/horizon/commit/28b72d46c593284804f7c9c4883ce95a24052d95) Give turtles vanilla's goals: panic, tempt, go to water, travel and stroll - [`966c380`](https://github.com/horizon-rust/horizon/commit/966c38092d436ca279809d05689b3c59087fb840) Merge main into fix/turtle-goals - [`18b3171`](https://github.com/horizon-rust/horizon/commit/18b317186aab0e1e5bfa4f237d67824a8530e3fa) Merge main into fix/turtle-goals ### 📊 Changes **4 files changed** (+256 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+5 -3) 📝 `crates/horizon-client/src/mobs/goals.rs` (+14 -4) 📝 `crates/horizon-client/src/mobs/nav.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/turtle.rs` (+232 -7) </details> ### 📄 Description ## What and why Turtles ran the generic passive goals (an extra float goal, random look, panic at 1.25, look range 6) and only had the breed, lay egg and go home goals of their own. This gives them vanilla's list: - Panic at 1.2 that runs for water within 7 blocks first. - Tempt with seagrass (1.1). - Go to water: a turtle on land walks to water within 24 blocks (not while going home or carrying an egg). - Travel: a turtle in water swims towards a spot up to 512 blocks away, a leg at a time. - Random stroll every 100 ticks (not in water, going home or with an egg), look at players within 8, no float goal. To make them work it also sets what `Turtle` gives its navigation: amphibious path finding, no water malus, closed doors and open doors blocked, vanilla's `getWalkTargetValue` (water and sand score 10), and water-only destinations while travelling. Going home now sets `goingHome` as vanilla does. Not done here: the turtle move control and in-water travel (see #2565) and syncing the egg state to clients. ## Vanilla reference `Turtle.registerGoals`, `TurtlePanicGoal`, `TurtleGoToWaterGoal`, `TurtleTravelGoal`, `TurtleRandomStrollGoal`, `TurtleGoHomeGoal`, `TurtlePathNavigation.isStableDestination`, `Turtle.getWalkTargetValue` and `PanicGoal.lookForWater`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:54 +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#4538
No description provided.