[PR #7396] [MERGED] A tamed cat or wolf ordered to sit still looks for a mate #7576

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

📋 Pull Request Information

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

Base: main ← Head: fix/sitting-cat-breed


📝 Commits (2)

  • 41cc487 A tamed cat or wolf ordered to sit still looks for a mate
  • 7da932e Test a sitting tamed cat's and wolf's search for a mate

📊 Changes

3 files changed (+50 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/mobs/goals.rs (+4 -2)
📝 crates/horizon-client/src/mobs/tame.rs (+45 -0)
📝 tools/port_map/game-011.tsv (+1 -1)

📄 Description

Vanilla's Cat.canMate needs both cats tamed and in love (cat.isTame() && super.canMate(partner), and Animal.canMate is the class check plus isInLove() on both), with no sitting check at all. Wolf.canMate adds exactly one: the partner is refused while it isInSittingPose(). So the mob that goes looking for a mate is never refused for sitting, in either class.

Horizon's Breed::can_use refused any tamed cat or wolf that was sitting as the seeker (tamable && (!tame || sitting)). A tamed cat spends most of its life sitting, and one fed while sitting never went looking; a sitting wolf never walked to a standing partner either. The partner filter already had vanilla's rule (!(species == Species::Wolf && s.sitting)), so only the seeker's own check was wrong.

Proven: the vanilla side is the 26.3 client jar: Cat.canMate (tame, partner a tame Cat, super.canMate), Wolf.canMate (tame, partner a tame Wolf, wolf.isInSittingPose() false, both in love) and Animal.canMate (same class, both in love); SitWhenOrderedToGoal carries no movement flag and nothing else refuses a seated mob, so the seated cat really does walk off.

On the build VM, cargo test -q -p horizon-client-lib --lib a_sitting_tame_mob_still_looks_for_a_mate passes (1 passed). With the old || m.extra.sitting clause put back the same test fails on minecraft:cat: seeker sits true, partner sits true: left: false, right: true. cargo clippy -q -p horizon-client-lib --lib prints nothing, rustfmt --edition 2024 --check is clean on both files, and python3 tools/port_ledger.py map-check tools/port_map/game-011.tsv reports 148 rows, no problems.

Not proven: I did not run the game. The in-game check is feeding two tamed cats that are both sitting: they should stand into the breed walk and produce a kitten, and a sitting wolf should walk to a standing one while a sitting wolf is still not taken as the partner.

Corrects the Cat.canMate row of tools/port_map/game-011.tsv; the wolf's half of the same check had no row to correct.


🔄 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/7396 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sitting-cat-breed` --- ### 📝 Commits (2) - [`41cc487`](https://github.com/horizon-rust/horizon/commit/41cc4874e5b5d2523284749bc0d9a1f3fa15bfdf) A tamed cat or wolf ordered to sit still looks for a mate - [`7da932e`](https://github.com/horizon-rust/horizon/commit/7da932e807adb04252beecbbd5e89ada6c70a7f6) Test a sitting tamed cat's and wolf's search for a mate ### 📊 Changes **3 files changed** (+50 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/goals.rs` (+4 -2) 📝 `crates/horizon-client/src/mobs/tame.rs` (+45 -0) 📝 `tools/port_map/game-011.tsv` (+1 -1) </details> ### 📄 Description Vanilla's `Cat.canMate` needs both cats tamed and in love (`cat.isTame() && super.canMate(partner)`, and `Animal.canMate` is the class check plus `isInLove()` on both), with no sitting check at all. `Wolf.canMate` adds exactly one: the *partner* is refused while it `isInSittingPose()`. So the mob that goes looking for a mate is never refused for sitting, in either class. Horizon's `Breed::can_use` refused any tamed cat or wolf that was sitting as the seeker (`tamable && (!tame || sitting)`). A tamed cat spends most of its life sitting, and one fed while sitting never went looking; a sitting wolf never walked to a standing partner either. The partner filter already had vanilla's rule (`!(species == Species::Wolf && s.sitting)`), so only the seeker's own check was wrong. **Proven:** the vanilla side is the 26.3 client jar: `Cat.canMate` (tame, partner a tame `Cat`, `super.canMate`), `Wolf.canMate` (tame, partner a tame `Wolf`, `wolf.isInSittingPose()` false, both in love) and `Animal.canMate` (same class, both in love); `SitWhenOrderedToGoal` carries no movement flag and nothing else refuses a seated mob, so the seated cat really does walk off. On the build VM, `cargo test -q -p horizon-client-lib --lib a_sitting_tame_mob_still_looks_for_a_mate` passes (`1 passed`). With the old `|| m.extra.sitting` clause put back the same test fails on `minecraft:cat: seeker sits true, partner sits true: left: false, right: true`. `cargo clippy -q -p horizon-client-lib --lib` prints nothing, `rustfmt --edition 2024 --check` is clean on both files, and `python3 tools/port_ledger.py map-check tools/port_map/game-011.tsv` reports `148 rows, no problems`. **Not proven:** I did not run the game. The in-game check is feeding two tamed cats that are both sitting: they should stand into the breed walk and produce a kitten, and a sitting wolf should walk to a standing one while a sitting wolf is still not taken as the partner. Corrects the `Cat.canMate` row of `tools/port_map/game-011.tsv`; the wolf's half of the same check had no row to correct. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:20:07 +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#7576
No description provided.