Repository navigation
Custom Mob Spawning
Spawn rules can target a dimension and a biome after the mob. Both default to all of them, the same as writing *. Anywhere a biome is asked for, you can also use a biome tag (#minecraft:is_nether, #c:is_forest).
Targeting a dimension: a single ID after the mob is always the biome. To target a dimension in every biome, skip the biome with ?, like minecraft:zombie|minecraft:the_nether|?.
Order: removeSpawns runs first, then spawnGroupSizes, then addSpawns, so your own added spawns keep their own group size and are never removed. Rules for every dimension are applied first, and rules for a single dimension are applied on top of them.
Stop a mob spawning naturally, or add a percentage to make it rarer instead.
removeSpawns = [
"minecraft:creeper|minecraft:plains",
"minecraft:spider",
"minecraft:zombie|50",
"minecraft:phantom|minecraft:the_end|?",
"minecraft:skeleton|minecraft:the_nether|#minecraft:is_nether"
]
- Creepers no longer spawn in plains.
- Spiders no longer spawn naturally anywhere.
- Zombies spawn half as often in every biome.
- Phantoms no longer spawn in the End dimension.
- Skeletons no longer spawn in Nether biomes, but only in the Nether dimension.
This works on spawns from vanilla, datapacks and other mods, and also covers phantoms, cats, pillager patrols, the wandering trader, village sieges/raids, and structure spawns (fortresses, ocean monuments, witch huts, pillager outposts) for every-dimension rules.
Tip: *|*|* plus a few addSpawns lines leaves only those mobs spawning. A line that is only * is rejected, so you can't clear every spawn by accident.
Change how many of a mob spawn together, without changing whether or how often it spawns.
spawnGroupSizes = [
"minecraft:zombie|minecraft:desert|2|4",
"minecraft:cow|1|3"
]
- Zombies spawn in groups of 2–4 in deserts.
- Cows spawn in groups of 1–3 everywhere.
This only affects mobs that already spawn naturally; it doesn't add or remove any spawns.
Make mobs spawn naturally in biomes, with your own spawn weight and group sizes. The weight is required. The minimum group defaults to 1, and the maximum defaults to the minimum.
addSpawns = [
"minecraft:bat|minecraft:beach|10|1|3",
"minecraft:zombie|minecraft:desert|50|2|4",
"minecraft:cow|20|1|2",
"minecraft:blaze|minecraft:the_nether|minecraft:nether_wastes|10",
"minecraft:wolf|#c:is_forest|8|2|4"
]
- Bats spawn on beaches with a weight of 10, in groups of 1–3.
- Zombies spawn in deserts with a weight of 50, in groups of 2–4.
- Cows spawn in every biome with a weight of 20, in groups of 1–2.
- Blazes spawn one at a time in Nether Wastes, but only in the Nether dimension.
- Wolves spawn in every forest biome, including modded forests.
Spawn weights are relative to the other spawns in the biome, not percentages. Most hostile mobs use 100 and farm animals around 10. By default added mobs still need the usual light and space conditions to spawn; this can be turned off per rule. You can also give the spawned mob equipment, a custom name, persistence (so it never despawns) and other data using the in-game entity data editor (see In-Game Config Screen) or /summon-style NBT text.
- This only affects natural biome spawning and the other spawn types removeSpawns covers. Spawner blocks, trial spawners, spawn eggs, commands and breeding are not affected.
- Rules for every dimension also affect animals placed during chunk generation and structure spawns (fortresses, ocean monuments, witch huts, pillager outposts).
- Rules for a single dimension only apply to spawning after chunks have generated, because one biome can be shared by several dimensions.
Only let a mob spawn naturally within a light level range (0–15), optionally limited to one dimension and biome.
lightSpawnRestrictions = [
"minecraft:zombie|?|7",
"minecraft:pig|10"
]
- Zombies only spawn at light level 7 or darker.
- Pigs only spawn at light level 10 or brighter.
Spawn eggs, spawners, commands and breeding are not affected.