-
Notifications
You must be signed in to change notification settings - Fork 3
spawner_randomizing_processor
finnsetchell edited this page Aug 15, 2026
·
1 revision
Sets a mob spawner's mob from a weighted list at generation time, along with the usual spawner timing values. Use it when you want one spawner NBT to produce varied mobs across placements instead of baking a fixed mob into every copy of the piece.
Adapted from RepurposedStructures (TelepathicGrunt), with the mob list taken inline in the codec rather than through a separate manager.
From MMR's desert mineshaft spawners:
{
"processor_type": "moogs_structures:spawner_randomizing_processor",
"weighted_entities": [
{ "entity": "minecraft:husk", "weight": 4 },
{ "entity": "minecraft:zombie", "weight": 2 },
{ "entity": "minecraft:cave_spider", "weight": 2 }
],
"min_spawn_delay": 300,
"max_spawn_delay": 900,
"spawn_count": 2,
"max_nearby_entities": 4,
"required_player_range": 14,
"spawn_range": 4
}| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
weighted_entities |
array | yes | The mob pool. See below. | |
delay |
int | no | 20 |
Ticks before the first spawn. |
min_spawn_delay |
int | no | 200 |
|
max_spawn_delay |
int | no | 800 |
|
spawn_count |
int | no | 4 |
|
max_nearby_entities |
int | no | 6 |
|
required_player_range |
int | no | 16 |
|
spawn_range |
int | no | 4 |
|
spawner_replacement_block |
block-state | no | minecraft:air |
Only used when weighted_entities is empty. See gotchas. |
| Field | Type | Required | Notes |
|---|---|---|---|
entity |
entity id | yes | Must resolve in the entity registry. |
weight |
int | yes | 1 or higher. Relative, not a percentage. |
nbt |
object | no | Extra tags merged into the spawned entity, for pre-equipped or pre-configured mobs. |
Weights are relative to their sum, so [4, 2, 2] and [40, 20, 20] behave the same. The roll is seeded from the spawner's position, so a given spawner in a given placement always picks the same mob, while separate spawners in one piece roll independently.
- Timing values are written as shorts. The codec accepts anything up to 2147483647, but values above 32767 wrap negative and produce a broken spawner. Keep them under 32767.
-
spawner_replacement_blockis not a fallback. It only applies whenweighted_entitiesis an empty array, in which case every spawner in the piece is replaced by that block. With the default, that deletes the spawner. It never fires when the list has entries. -
nbtcannot override the mob. Anidkey insidenbtis overwritten by the entry'sentityfield. -
Optional fields fail quietly. A typo in any field other than
weighted_entities(wrong type, out of range) is swallowed and the default is used, with nothing logged. Errors insideweighted_entitiesare hard failures instead. - Trial spawners are a different block and are not touched here. Use
trial_spawner_randomizing_processor.
- Structure Processors overview.
-
trial_spawner_randomizing_processorfor trial spawners.
Getting started
Core concepts
- pillar
- spawner_randomizing
- trial_spawner_randomizing
- vault_randomizing
- equip_armor_stand
- close_off_fluid_sources
- flood_with_water
- remove_floating_blocks
- random_replace_with_properties
- super_gravity
Advanced
- versioned_single_pool_element
- Nether jigsaw structures
- Enhanced terrain adaptation
- Entity processor framework
- Debug commands
- Advanced Topics
Examples