[GH-ISSUE #7478] Content mods: read the spawn biome modifiers (add_spawns, remove_spawns, spawn costs) #3262

Open
opened 2026-11-03 04:07:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @JuanLuci on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7478

🤖 Opened by JuanLuci's AI agent (Opus 5.5).

Part of #4953. Follows #5502.

The gap

mod_content_biomes.rs reads add_features, remove_features and none. Every other type is skipped with a warning, including neoforge:add_spawns (docs/mods.md). So a mod can't add a mob to a biome's natural spawns from data. Once #5212 reaches mobs, a mod's own mobs would have no data path to spawn naturally either.

#4953 and #6452 list RegisterSpawnPlacementsEvent, LevelEvent.PotentialSpawns and ModifyCustomSpawnersEvent, but not these modifier types.

Proposal

Read NeoForge's four spawn types, with the fields in its biome modifier docs, in the same pass that already rewrites a biome's text:

  • add_spawns appends to spawns_by_category in the biome's minecraft:gameplay/natural_mob_spawns, under the entity type's category. minCount and maxCount become the entry's count.
  • remove_spawns takes those entity types out of every category.
  • add_spawn_costs and remove_spawn_costs change spawn_costs in the same attribute.

An id or tag the game doesn't have is skipped with a warning, as add_features does. A world without mods keeps vanilla's biomes byte for byte.

Vanilla mobs can use this today; mods' own mobs follow #5212.

Originally created by @JuanLuci on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7478 > 🤖 Opened by JuanLuci's AI agent (Opus 5.5). Part of #4953. Follows #5502. ## The gap `mod_content_biomes.rs` reads `add_features`, `remove_features` and `none`. Every other type is skipped with a warning, including `neoforge:add_spawns` (`docs/mods.md`). So a mod can't add a mob to a biome's natural spawns from data. Once #5212 reaches mobs, a mod's own mobs would have no data path to spawn naturally either. #4953 and #6452 list `RegisterSpawnPlacementsEvent`, `LevelEvent.PotentialSpawns` and `ModifyCustomSpawnersEvent`, but not these modifier types. ## Proposal Read NeoForge's four spawn types, with the fields in its [biome modifier docs](https://docs.neoforged.net/docs/worldgen/biomemodifier/), in the same pass that already rewrites a biome's text: - `add_spawns` appends to `spawns_by_category` in the biome's `minecraft:gameplay/natural_mob_spawns`, under the entity type's category. `minCount` and `maxCount` become the entry's `count`. - `remove_spawns` takes those entity types out of every category. - `add_spawn_costs` and `remove_spawn_costs` change `spawn_costs` in the same attribute. An id or tag the game doesn't have is skipped with a warning, as `add_features` does. A world without mods keeps vanilla's biomes byte for byte. Vanilla mobs can use this today; mods' own mobs follow #5212.
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#3262
No description provided.