[GH-ISSUE #3772] Cat: the player-avoidance goal is registered first, and a dashing cat does not sprint #1080

Closed
opened 2026-11-02 15:44:06 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @xFedeT on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3772

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

What: two differences between a wild cat and vanilla's, both visible in the cat's first ticks and in how fast it runs from a player:

  1. Cat.reassessTameGoals adds CatAvoidEntityGoal<Player> after registerGoals, and goals run in insertion order, so the avoidance is evaluated last. Horizon registers it in the middle of the list: the stroll and look goals never draw their random intervals before it and the random stream drifts from vanilla's on the cat's first tick.
  2. Cat.customServerAiStep sets the cat sprinting while its move control's speed modifier is 1.33 (the dash away). Sprinting adds the +30% speed modifier and makes Entity.baseTick spawn sprint dust, which draws twice from the cat's random. Horizon had neither (it only drew the sprint pose for rendering).

How to reproduce: a mob_ai scenario with a cat and a player 6 blocks away: first divergence at tick 1 (vanilla draws 41 times, Horizon 43), then at tick 6 (movement input 0.5187 in vanilla, 0.399 in Horizon).

Where in Horizon: crates/horizon-client/src/mobs/tame.rs (register_cat), crates/horizon-client/src/mobs/ai.rs (custom_server_ai_step, speed_bonus, base_tick).

Originally created by @xFedeT on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3772 > 🤖 Filed by Federico's AI agent (Claude), not by Federico himself. **What:** two differences between a wild cat and vanilla's, both visible in the cat's first ticks and in how fast it runs from a player: 1. `Cat.reassessTameGoals` adds `CatAvoidEntityGoal<Player>` after `registerGoals`, and goals run in insertion order, so the avoidance is evaluated last. Horizon registers it in the middle of the list: the stroll and look goals never draw their random intervals before it and the random stream drifts from vanilla's on the cat's first tick. 2. `Cat.customServerAiStep` sets the cat sprinting while its move control's speed modifier is 1.33 (the dash away). Sprinting adds the +30% speed modifier and makes `Entity.baseTick` spawn sprint dust, which draws twice from the cat's random. Horizon had neither (it only drew the sprint pose for rendering). **How to reproduce:** a `mob_ai` scenario with a cat and a player 6 blocks away: first divergence at tick 1 (vanilla draws 41 times, Horizon 43), then at tick 6 (movement input 0.5187 in vanilla, 0.399 in Horizon). **Where in Horizon:** `crates/horizon-client/src/mobs/tame.rs` (`register_cat`), `crates/horizon-client/src/mobs/ai.rs` (`custom_server_ai_step`, `speed_bonus`, `base_tick`).
Author
Owner

@xFedeT commented on GitHub (Oct 29, 2026):

🤖 Agent: PR #3773 is open (Federico's agent): the avoidance goal is registered last as in vanilla and a dashing cat sprints. A new cat_player scenario matches 121/121 ticks.

<!-- gh-comment-id:6501291022 --> @xFedeT commented on GitHub (Oct 29, 2026): 🤖 Agent: PR #3773 is open (Federico's agent): the avoidance goal is registered last as in vanilla and a dashing cat sprints. A new `cat_player` scenario matches 121/121 ticks.
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 29, 2026):

Claimed by FedeT_ on Discord (GitHub: xFedeT), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #3772).

<!-- gh-comment-id:6505236346 --> @kira-horizon[bot] commented on GitHub (Oct 29, 2026): Claimed by `FedeT_` on Discord (GitHub: `xFedeT`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #3772). <!-- kira:work -->
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#1080
No description provided.