How does mob spawning work on a Minecraft server?
Every tick (1/20 of a second) the server tries to spawn new mobs in the chunks around players, but only until each mob category reaches its limit – the mob cap. The range, the cap and how often the server tries are the three things you can change.
The rules the game uses (Java Edition):
- Range: mobs spawn at most 128 blocks (8 chunks) from a player and never closer than 24 blocks.
- Despawning: hostile mobs more than 128 blocks from the nearest player disappear instantly; beyond 32 blocks they despawn at random.
- Cap: each category has its own cap, e.g. 70 monsters and 10 animals. It scales with the number of chunks around players, so players spread across the map mean more mobs in total.
- Rate: monsters, water mobs and bats get a spawn attempt every tick; animals only every 400 ticks (20 seconds).
Plain Vanilla has no file where you can change these numbers. You need a Bukkit-family server: Paper or Purpur (and hybrid servers like Mohist and Arclight), which read spigot.yml and bukkit.yml.
Where to change mob spawning – all options at a glance
The range lives in spigot.yml (mob-spawn-range), the caps and spawn rate in bukkit.yml (spawn-limits, ticks-per), and Paper can override them per world in config/paper-world-defaults.yml.
| File | Option | Default | What it does |
|---|---|---|---|
spigot.yml |
mob-spawn-range |
8 |
Radius in chunks around a player where mobs can spawn |
bukkit.yml |
spawn-limits |
monsters: 70, animals: 10 and more |
How many mobs of each category can exist at once |
bukkit.yml |
ticks-per |
monster-spawns: 1, animal-spawns: 400 and more |
How many ticks pass between spawn attempts for each category |
config/paper-world-defaults.yml |
entities.spawning.per-player-mob-spawns |
true |
Whether the cap is counted per player or for the whole server |
config/paper-world-defaults.yml |
entities.spawning.spawn-limits, ticks-per-spawn |
-1 (use bukkit.yml) |
Same as in bukkit.yml, but can differ per world |
The server reads all of these files on startup, so restart it after every change. /paper reload doesn't reload spigot.yml and isn't supported by the Paper team anyway.
How to change mob-spawn-range in spigot.yml
Open spigot.yml, find mob-spawn-range under world-settings → default and set a number of chunks from 1 to 8. A lower value makes mobs spawn closer to players and in fewer chunks.
world-settings:
default:
mob-spawn-range: 6
Worth knowing:
- Values above 8 do nothing. Paper caps the range at 8 chunks and at the player's view distance, and mobs only spawn in chunks within the simulation distance (
simulation-distance) anyway. - Keep it at or below your simulation distance. With a simulation distance of 6, a
mob-spawn-rangeof 8 behaves like 6. - Too low breaks spawning. Mobs never spawn within 24 blocks of a player, so at 1–2 chunks (16–32 blocks) there's almost no room left. A sensible range is 4–8.
- Mob farms. Classic AFK farms are built around the 128-block range. With a lower
mob-spawn-range, a farm far from the player can stop working – while the same mobs now spawn more densely around them.
A smaller range with the same cap packs mobs closer to players: nights look much the same, but the server handles spawning in fewer chunks.
How to change the mob cap (spawn-limits) in bukkit.yml
The cap for each mob category is the spawn-limits section in bukkit.yml – lower monsters for fewer hostile mobs or animals for fewer animals. These are the defaults:
spawn-limits:
monsters: 70
animals: 10
water-animals: 5
water-ambient: 20
water-underground-creature: 5
axolotls: 5
ambient: 15
| Key | Category | Examples |
|---|---|---|
monsters |
Hostile mobs | zombies, skeletons, creepers, spiders |
animals |
Passive animals | cows, sheep, pigs, chickens |
water-animals |
Water creatures | squid, dolphins |
water-ambient |
Fish | cod, salmon, tropical fish |
water-underground-creature |
Underground water mobs | glow squid |
axolotls |
Axolotls | axolotls in lush caves |
ambient |
Ambient mobs | bats |
The cap only applies to natural spawning. It doesn't stop spawners, animal breeding or spawn eggs – if your server lags from thousands of cows in a pen, you need an entity limit (e.g. a plugin) or tidier farms, not spawn-limits. More in how to reduce entity lag.
To stop monsters spawning entirely, a game rule is cleaner than setting 0: on Minecraft 1.21.9 and newer use gamerule spawn_monsters false (on 1.21.9–1.21.10 it's spawnMonsters). See Minecraft gamerules.
How to change the mob spawn rate (ticks-per)
The ticks-per section in bukkit.yml sets how many ticks pass between spawn attempts for each category – a higher number means fewer attempts and mobs refilling more slowly. 20 ticks is 1 second.
ticks-per:
animal-spawns: 400
monster-spawns: 1
water-spawns: 1
water-ambient-spawns: 1
water-underground-creature-spawns: 1
axolotl-spawns: 1
ambient-spawns: 1
autosave: 6000
monster-spawns: 1– a monster spawn attempt every tick, like Vanilla.2–5cuts the number of attempts; monsters still reach the cap, just more slowly.animal-spawns: 400– animals every 20 seconds. Don't lower it: animals don't despawn on their own and would fill the cap faster.-1means the Vanilla default.autosaveisn't about spawning – it's how often (in ticks) the world is saved. Leave it alone.
Changing ticks-per doesn't change how many mobs can exist at once – that's spawn-limits. Fewer attempts mostly save CPU time and make monsters come back more slowly after a fight.
What is per-player-mob-spawns in Paper?
per-player-mob-spawns (default true) makes the bukkit.yml cap count separately for each player instead of for the whole server. It's in config/paper-world-defaults.yml, under entities → spawning.
entities:
spawning:
per-player-mob-spawns: true
Without it, one player next to a big farm or in huge unlit caves can use up the whole monster cap, and everyone else sees no mobs at all. With it on, each player gets their own share and mobs are spread more evenly. Keep it true unless you deliberately want the old behaviour.
Paper also has its own spawn-limits and ticks-per-spawn in the same place. They default to -1, meaning "use bukkit.yml". They're useful when one world needs a different value: put only the key you're changing into the paper-world.yml file in that world's folder (e.g. the Nether), and everything else is inherited. Note the keys are named differently than in bukkit.yml: monster, creature, ambient, axolotls, underground_water_creature, water_ambient, water_creature.
entities:
spawning:
spawn-limits:
monster: 50
Best mob spawn settings for performance
Lower the simulation distance first, then mob-spawn-range, and only then the mob caps – in that order you gain the most while changing gameplay the least. The values below are our starting points, not official recommendations – measure before and after.
| Situation | mob-spawn-range |
monsters |
animals |
monster-spawns |
|---|---|---|---|---|
| A few friends, server runs smoothly | 8 (default) |
70 |
10 |
1 |
| 10–30 players, TPS drops at times | 6 |
50 |
8 |
2 |
| Many players or little CPU headroom | 4–5 |
30–40 |
5–6 |
3–5 |
A few tips:
- Measure before you change anything. On Paper,
paper mobcapsshows the caps and mob counts in a world, andpaper playermobcaps <player>shows a player's local caps. To see what actually loads the server, use a profiler – see spark profiler for Minecraft. - Change one thing at a time. Otherwise you won't know what helped.
- A tiny monster cap ruins the game. With
monsters: 20, nights feel empty and XP farms stop making sense. - Mobs aren't the only entities. Dropped items, minecarts and penned animals also load the server – see how to fix Minecraft server lag.
How to change mob spawning on a Spot.gg server
Open "Files", click "Edit" next to spigot.yml or bukkit.yml, change the values, click "Save" and restart the server. The files appear after the server has started once on Paper or Purpur.
- In "Backup", click "Create backup" – just in case something goes wrong in the file.
- Go to "Files".
spigot.ymlandbukkit.ymlare in the server's main folder;paper-world-defaults.ymlis in theconfigfolder. - Click "Edit" next to the file. Change the value and click "Save". Indentation in
.ymlfiles uses spaces – don't remove it and don't use tabs. - Restart the server with the restart button in the panel's top bar.
- Check the result in "Console":
paper mobcaps(no slash).
You can change the simulation distance without editing files: "Configuration" → "Most popular" → "Performance" → the "Simulation distance" slider, then "Save changes" and "Restart now". More in Minecraft simulation distance.
Servers on Vanilla, Fabric, Forge or NeoForge have no spigot.yml or bukkit.yml. Your options there are the simulation distance, game rules in "Console" (gamerule spawn_mobs false turns off natural mob spawning, gamerule spawn_monsters false only monsters; up to 1.21.10 they're doMobSpawning and spawnMonsters), or a spawn-control mod for your loader. If you don't use mods and want full control, switch to Paper – see how to install Paper.
Paid Minecraft servers on Spot.gg start from $3.90 per month.
FAQ
How do I reduce the number of mobs on my Minecraft server?
On Paper or Purpur, lower monsters (and animals if needed) in the spawn-limits section of bukkit.yml, e.g. from 70 to 50, and restart. With per-player-mob-spawns: true the cap applies to each player separately.
Why doesn't a mob-spawn-range above 8 work?
Paper caps the spawn range at 8 chunks (128 blocks) and at the player's view distance. Hostile mobs further out would despawn instantly anyway, because they're too far from any player.
How do I turn off monster spawning on a server?
Run gamerule spawn_monsters false in the console (Minecraft 1.21.9 and newer). Peaceful difficulty also works, but it removes monsters already in the world too. Spawners keep working either way.
Why are there no mobs on my server?
Usually the cap is already filled by mobs elsewhere (a farm or unlit caves), the difficulty is peaceful, the spawn_mobs or spawn_monsters rule is off, or mob-spawn-range is too low. Check paper mobcaps in the console.
Do I need to restart after changing spigot.yml or bukkit.yml?
Yes. Both files are read on startup, and /paper reload doesn't reload them.