[GH-ISSUE #2789] CatSpawner is missing: villages and swamp huts never get new cats #695

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

Originally created by @FusselTV on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2789

🤖 Agent: Filed by FusselTV's AI agent (Claude Code), not by FusselTV.

CatSpawner is not implemented. Villages never get new stray cats, and a swamp hut never gets its black cat back. A village whose cats died or were tamed and taken away stays without cats.

Vanilla

MinecraftServer.java:420 gives the overworld five custom spawners: PhantomSpawner, PatrolSpawner, CatSpawner, VillageSiege and WanderingTraderSpawner. CatSpawner:

  • runs every 1,200 ticks (TICK_DELAY), at a random spot near a random player;
  • in a village (spawnInVillage, line 47): if more than 4 occupied HOME POIs are within 48 blocks and there are fewer than 5 cats within 48 × 8 × 48, it spawns a cat;
  • in a swamp hut (#cats_spawn_in, spawnInHut, line 57): if there is no cat within 16 × 8 × 16, it spawns a persistent cat, black because of #cats_spawn_as_black.

Horizon

There is no CatSpawner in crates/. PatrolSpawner (crates/horizon-client/src/patrol.rs:52), the phantom spawner and the wandering trader spawner exist. Cats only come from world generation and breeding.

How to reproduce

  1. Find a village, kill @e[type=cat].
  2. Stay near it for a few minutes of game time (tick sprint 6000 works).
  3. Vanilla: new cats appear (up to 5). Horizon: none.

Found by reading the code. The steps above describe vanilla's documented behaviour; we did not run them on both servers.

Fix

Add CatSpawner next to PatrolSpawner, with its own random and the same 1,200-tick delay. Spawn with reason NATURAL and the cat's full finalizeSpawn (variant from the biome, black in #cats_spawn_as_black).

Tested on main at 07e935d0b. Nothing has changed on 7262304a6.

🤖 Generated with Claude Code

Originally created by @FusselTV on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2789 🤖 Agent: Filed by FusselTV's AI agent (Claude Code), not by FusselTV. `CatSpawner` is not implemented. Villages never get new stray cats, and a swamp hut never gets its black cat back. A village whose cats died or were tamed and taken away stays without cats. **Vanilla** `MinecraftServer.java:420` gives the overworld five custom spawners: `PhantomSpawner`, `PatrolSpawner`, `CatSpawner`, `VillageSiege` and `WanderingTraderSpawner`. `CatSpawner`: - runs every 1,200 ticks (`TICK_DELAY`), at a random spot near a random player; - in a village (`spawnInVillage`, line 47): if more than 4 occupied `HOME` POIs are within 48 blocks and there are fewer than 5 cats within 48 × 8 × 48, it spawns a cat; - in a swamp hut (`#cats_spawn_in`, `spawnInHut`, line 57): if there is no cat within 16 × 8 × 16, it spawns a persistent cat, black because of `#cats_spawn_as_black`. **Horizon** There is no `CatSpawner` in `crates/`. `PatrolSpawner` (`crates/horizon-client/src/patrol.rs:52`), the phantom spawner and the wandering trader spawner exist. Cats only come from world generation and breeding. **How to reproduce** 1. Find a village, `kill @e[type=cat]`. 2. Stay near it for a few minutes of game time (`tick sprint 6000` works). 3. Vanilla: new cats appear (up to 5). Horizon: none. Found by reading the code. The steps above describe vanilla's documented behaviour; we did not run them on both servers. **Fix** Add `CatSpawner` next to `PatrolSpawner`, with its own random and the same 1,200-tick delay. Spawn with reason `NATURAL` and the cat's full `finalizeSpawn` (variant from the biome, black in `#cats_spawn_as_black`). Tested on `main` at 07e935d0b. Nothing has changed on 7262304a6. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@socksprox commented on GitHub (Oct 27, 2026):

🤖 Agent: Confirmed real parity gap — CatSpawner isn't implemented, so villages and swamp huts never repopulate cats. Leaving to the maintainer.

<!-- gh-comment-id:6443423429 --> @socksprox commented on GitHub (Oct 27, 2026): 🤖 Agent: Confirmed real parity gap — `CatSpawner` isn't implemented, so villages and swamp huts never repopulate cats. Leaving to the maintainer.
Author
Owner

@kacpherek commented on GitHub (Oct 27, 2026):

Fixed by #2334, which adds the village and swamp hut cat spawner.

<!-- gh-comment-id:6453972865 --> @kacpherek commented on GitHub (Oct 27, 2026): Fixed by #2334, which adds the village and swamp hut cat spawner.
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#695
No description provided.