Custom Spawns -- Configurable Mob Caps and Persistence
Fabric API and Cloth Config are required!
This is a simple server-side Fabric mod that allows you to configure various mob caps and persistence, as well as increase the rate of passive mob spawning. You can also use this to add or remove mob spawns from specific biomes.
Made as a companion mod to my old world gen mod, Modern Beta, you can use this to restore classic passive mob spawning!
=================================================================
Configuration
You can configure Custom Spawns through Mod Menu (recommended) or in the config/customspawn.json file.
The current options are:
Note: For the following options, please note the following formula used to calculate mob caps:
Actual Mob Cap = Mob Cap * Chunks [289 in Singleplayer] / (Spawn Chunk Constant ^ 2)
General
- chunkConstant (default: 17): Constant to modify actual mob cap.
- rareSpawnTicksToWait (default: 400): Number of ticks between rare mob spawn attempts. (20 ticks = 1 second)
Mob Spawn Group Options
- capacity: Maximum mob cap.
- peaceful: Whether mobs in this category are spawned as animals or monsters.
- rare: Whether mobs in this category are spawned with the customizable rare spawn tick timer.
- immediateDespawnRange: The distance at which mobs in this category immediately despawn, if not persistent.
- despawnStartRange: The distance at which mobs start to have a change to despawn, typically 40 seconds, if not persistent.
Mob Persistence
- passivePersistent (default: true): Enable/disable passive mob despawning.
- hostilePersistent (default: false): Enable/disable hostile mob despawning.
- ambientPersistent (default: false): Enable/disable ambient mob despawning.
- waterPersistent (default: false): Enable/disable water mob despawning.
Note: Non-persistent mobs can still be made persistent by renaming them or modifying the NBT tag. Saddled or tamed mobs should not despawn regardless of persistence setting.
Mob Spawn Additions
- biomeId: Fully-qualifed biome Identifier.
- mobId: Fully-qualified mob Identifier.
- spawnGroup: Spawn group for the mob to be placed in. Can be one of: MONSTER, CREATURE, AMBIENT, WATER_CREATURE, WATER_AMBIENT, UNDERGROUND_WATER_CREATURE (1.17+), AXOLOTLS (1.18+)
- weight: Spawn likelihood.
- minCount: Minimum group size.
- maxCount: Maximum group size.
Note: Mobs may have their own spawn restrictions outside of the spawn group they are placed in (e.g. Phantoms do not check for the light level before spawning, so if added as a natural spawn to an overworld biome, they will spawn in broad daylight even if placed under the MONSTER category).
Config example:
"biomeId": "minecraft:plains",
"mobId": "minecraft:pig",
"spawnGroup": "CREATURE",
"weight": 10,
"minCount": 4,
"maxCount": 4
}
Mob Spawn Removals
- biomeId: Fully-qualifed biome Identifier.
- mobId: Fully-qualified mob Identifier.
Config example:
"biomeId": "minecraft:plains",
"mobId": "minecraft:pig"
}
Mob Spawners
- overrideSpawnerDefaultValues: Toggle mob spawner settings. If you have custom spawners or another mod that modifies spawners, leave this off/false.
- minSpawnDelay: Minimum tick delay between spawn attempts.
- minSpawnDelay: Maximum tick delay between spawn attempts.
- spawnCount: Maximum number of mobs that may be spawned.
- maxNearbyEntities: Maximum number of nearby mobs of the same type before the spawn attempt fails.
- requiredPlayerRange: Spawner activation spherical radius.
- spawnRange: Mob spawn radius.
Following the Beta 1.2_01 spawning algorithm, to restore classic Beta mob spawning, use the following values:
- Spawn Chunk Constant: 15
- Creature Mob Cap: 15
- Passive Mob Rare Spawn: False
- Passive Mob Persistence: False
- All other options should be left at default.
When I open the game it says this
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils$$Lambda$567/2075933550.apply(Unknown Source)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils$$Lambda$567/2075933550.apply(Unknown Source)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at me.shedaniel.autoconfig.ConfigManager.(ConfigManager.java:53)
at me.shedaniel.autoconfig.AutoConfig.register(AutoConfig.java:66)
at com.bespectacled.customspawn.CustomSpawn.(CustomSpawn.java:18)
... 21 more
This only happens with the mod installed.
Is chunkConstant meant to be high for more spawn or low for more spawns?
If I use the mob addition on a mob from a mod, will that allow me to adjust its spawn weight down? Some of my mod-based mobs are spawning way too often and lack a config.
"mobSpawnRemovals": [
{
"biomeId": "minecraft:cold_ocean","minecraft:river",
"mobId": "minecraft:salmon"
},
{
"biomeId": "minecraft:plains",
"mobId": "minecraft:slime"
}
],
what is wrong with this?
server log keeps complaining about not loading ;-(
In reply to Wackoamd:
You'll have to separate the Cold Ocean and River Salmon removal entries, i.e.
{
"biomeId": "minecraft:cold_ocean",
"mobId": "minecraft:salmon"
},
{
"biomeId": "minecraft:river",
"mobId": "minecraft:salmon"
}
In reply to b3spectacled:
thanks allot
since we can niow remove mobs , is there a way to remove a mob from every biome or do i have to type in every biome seperate , comma seperated ?
In reply to wackoamd:
For now you'll need a separate entry for every biome you want to remove a particular mob from.
In reply to b3spectacled:
oke thanks
Hello!
I've read another comment about conflict with carpet mod which mentioned that the issue was fixed, however it doesn't seems to work on 1.18 version. Here I attempt to set to 1000 the creature mob cap and it doesn't seem to work: https://i.imgur.com/kQ6Jfxd.jpeg
Any updated info about the carpet conflict with this mod?
Thanks in advance!
In reply to ScorchedPsyche:
Thanks for the report, I'll investigate this.
Heya! I was wondering if it's possible to add the 1.18 snapshot feature where you can make mob spawn rates independent of height, or make it so it depends on block height, not heightmap column. Thank you!
how do i make it so that passive mobs still spawn in already loaded chunks
In reply to qancak:
You can just set the 'rare' setting under the 'Creature' category to false and the game will attempt to spawn most passive mobs every tick.
This works on multiplayer servers?
In reply to qancak:
It would have to be installed server-side.
could u please explain what
"overrideSpawnerDefaultValues": false,
"minSpawnDelay": 200,
"maxSpawnDelay": 800,
"spawnCount": 4,
"maxNearbyEntities": 6,
"requiredPlayerRange": 16,
"spawnRange": 4
in the json do , i know what the rest does but this isnt in the description above XD
thx in advance
In reply to wackoamd:
Thanks, I've updated the description with this info.
can we use the biome category instead of the specific biome in the biomeId?
Is it possible to disable ONLY the phantom spawns? I don't care if I can't fly as much or make slow falling potions and get the cat disc. Ground mobs are one thing but the 3rd fastest mob, that never stops spawning after 3 or so days without sleep, with a hitbox the size of a bat just for a music disc, a slow falling potion, and more flight time? I hope this works...