[PR #7300] [MERGED] Roll husk, drowned and zombie horse mounts only for natural spawns #7476

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

📋 Pull Request Information

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

Base: main ← Head: fix/2783-jockeys-by-spawn-reason


📝 Commits (4)

📊 Changes

4 files changed (+72 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+14 -1)
📝 crates/horizon-client/src/game/passengers.rs (+55 -3)
📝 crates/horizon-client/src/game/spawner.rs (+1 -1)
📝 crates/horizon-client/src/game/zombie_reinforcements.rs (+2 -1)

📄 Description

🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally.

What

Zombie-horse riders, camel husks and zombie nautilus jockeys were rolled for spawns that vanilla does not give them. spawn_jockeys(id, natural) now gets natural = false from:

  • spawner.rs (add_planned, also reached by the trial spawner path): reasons SPAWNER / TRIAL_SPAWNER.
  • Zombie reinforcements (reason REINFORCEMENT), through a new spawn_mob_reason(.., natural). spawn_mob_for keeps natural = !persistent, so every other caller is unchanged.

The decision is extracted into a pure mount_rolls(species, baby, natural) in passengers.rs, with unit tests. No RNG draw order changes: only a boolean at two call sites flips.

Vanilla reference

Husk.java:105 (triedToSpawnCamelHusk = reason != NATURAL), Drowned.java:118/121 (NATURAL or STRUCTURE, not baby; STRUCTURE comes from worldgen), ZombieHorse.java:135 (NATURAL only). Spider and chicken jockeys are unconditional in vanilla and untouched.

How tested

  • Unit tests game::passengers::tests (expected values from the vanilla source above).
  • parity.py spawner trial_spawner finalize_spawn: 3 passed, 0 failed.

pr_ready --quick (--base upstream/main): Scope 4 files +71 −6; Public tree ✅; Python tests ✅ 612; rustfmt ✅; clippy ✅; horizon-client tests ✅ 692; doc tests ✅. mod API up to date ❌: xtask mod_api reports crates/horizon-client/src/mod_api/generated.rs stale on upstream/main itself (regenerating changes only that file, which this PR does not touch), so it is unrelated to this change.
Remaining affected harnesses: run by CI's parity job.

Suggested label: none (fix)

Part of #2783

🤖 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/7300 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2783-jockeys-by-spawn-reason` --- ### 📝 Commits (4) - [`6feeb19`](https://github.com/horizon-rust/horizon/commit/6feeb199b746220a51c92c813620eaf609f523c2) Roll zombie horse, husk and drowned mounts only for natural spawns - [`db70635`](https://github.com/horizon-rust/horizon/commit/db7063576236ea2869e2f89903199a9ae68bc68a) Format - [`512c405`](https://github.com/horizon-rust/horizon/commit/512c4054c56215131ac7b196a0ce72adfd4a0099) Clarify mount_rolls comment - [`b3c0ba9`](https://github.com/horizon-rust/horizon/commit/b3c0ba9c1e7d7d11da613272fdf61750335f2e82) Merge main into #7300 ### 📊 Changes **4 files changed** (+72 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+14 -1) 📝 `crates/horizon-client/src/game/passengers.rs` (+55 -3) 📝 `crates/horizon-client/src/game/spawner.rs` (+1 -1) 📝 `crates/horizon-client/src/game/zombie_reinforcements.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What Zombie-horse riders, camel husks and zombie nautilus jockeys were rolled for spawns that vanilla does not give them. `spawn_jockeys(id, natural)` now gets `natural = false` from: - `spawner.rs` (`add_planned`, also reached by the trial spawner path): reasons SPAWNER / TRIAL_SPAWNER. - Zombie reinforcements (reason REINFORCEMENT), through a new `spawn_mob_reason(.., natural)`. `spawn_mob_for` keeps `natural = !persistent`, so every other caller is unchanged. The decision is extracted into a pure `mount_rolls(species, baby, natural)` in `passengers.rs`, with unit tests. No RNG draw order changes: only a boolean at two call sites flips. ## Vanilla reference `Husk.java:105` (`triedToSpawnCamelHusk = reason != NATURAL`), `Drowned.java:118/121` (NATURAL or STRUCTURE, not baby; STRUCTURE comes from worldgen), `ZombieHorse.java:135` (NATURAL only). Spider and chicken jockeys are unconditional in vanilla and untouched. ## How tested - Unit tests `game::passengers::tests` (expected values from the vanilla source above). - `parity.py spawner trial_spawner finalize_spawn`: 3 passed, 0 failed. pr_ready --quick (`--base upstream/main`): Scope 4 files +71 −6; Public tree ✅; Python tests ✅ 612; rustfmt ✅; clippy ✅; horizon-client tests ✅ 692; doc tests ✅. **mod API up to date ❌**: `xtask mod_api` reports `crates/horizon-client/src/mod_api/generated.rs` stale on upstream/main itself (regenerating changes only that file, which this PR does not touch), so it is unrelated to this change. Remaining affected harnesses: run by CI's parity job. Suggested label: none (fix) Part of #2783 🤖 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 06:39:58 +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#7476
No description provided.