Skip to content
MC Command Generator

Spawner Command Generator

Beta

Pick the mob, tune how often and how many it spawns, and see the activation and spawn ranges on a map. Copy a /setblock command for your Java version.

Describe it — AI writes the command

Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.

Checking the AI…

Paste a command— edit it here or move it to another version
More mobsoptional

Each spawn picks one mob type. The main mob has weight 1; a mob with weight 3 comes up three times as often.

Timing20 ticks = 1 second
Mobs and ranges
Other NBToptional

Any spawner tag this form has no field for (LootTable, custom_spawn_rules, spawn potentials with their own mob tags…). Pasted commands and raw NBT edits put unknown tags here, so nothing is lost.

Other NBT tags without the { }, e.g. PortalCooldown:100

Written exactly as typed, for the version you pick. A tag the form also sets is left out.

player 24spawns ±4
every 5 s–15 s6 per spawnstops at 6 nearby
Zombie spawner

Your command · Java 26.3

174 characters
/setblock ~ ~ ~ minecraft:spawner{SpawnData:{entity:{id:"minecraft:zombie"}},MinSpawnDelay:100s,MaxSpawnDelay:300s,SpawnCount:6s,MaxNearbyEntities:6s,RequiredPlayerRange:24s}

Raw editor

Click or tap any key or value to see its full path here.
Valid NBT In sync
Ctrl+F find · Ctrl+Space suggest · Ctrl+. fix · Shift+Alt+F format

How it works

A spawner is a block with data that says which mob it makes and how often. You place it with /setblock and the data goes in curly braces.

Java 1.18 and later

setblock ~ ~ ~ minecraft:spawner{SpawnData:{entity:{id:"minecraft:blaze"}},MinSpawnDelay:100s,MaxSpawnDelay:300s,SpawnCount:6s}

Java 1.13 to 1.17

The mob ID sits directly in SpawnData, without the entity wrapper:

setblock ~ ~ ~ minecraft:spawner{SpawnData:{id:"minecraft:blaze"},MinSpawnDelay:100s,MaxSpawnDelay:300s,SpawnCount:6s}

The numbers

Delays are in ticks (20 per second). After each spawn the spawner waits a random time between the shortest and longest wait (200 to 800 ticks by default), then tries to place Mobs per spawn (4) mobs within the spawn radius (4 blocks). It only runs while a player is within the player range (16 blocks), and stops while Max nearby (6) of its mob are around.

The game reads the three timing values together and the two range values together, so the generator writes a whole group as soon as you change one of its values. Several mob types go in SpawnPotentials with weights.

Bedrock

Bedrock has no block NBT, so a command can only place an empty spawner: setblock ~ ~ ~ mob_spawner. In Creative, use a spawn egg on it to choose the mob. Delays and ranges cannot be changed.

FAQ

How do I make a spawner spawn faster?

Lower the shortest and longest wait. 100 and 300 ticks spawns every 5 to 15 seconds instead of 10 to 40. Raise Mobs per spawn and Max nearby too, or the spawner stops once a few mobs are around.

Why does my spawner command make an empty spawner?

From Java 1.18 the mob goes in SpawnData:{entity:{id:...}}. Commands from older tutorials use SpawnData:{id:...}, which newer versions ignore. Since 1.19.3 a spawner without SpawnData is empty instead of spawning pigs.

Can a spawner spawn more than one kind of mob?

Yes on Java. Add more mobs with weights; the spawner picks one type for each spawn, and higher weights come up more often.

How do I change a spawner's mob on Bedrock?

Use a spawn egg on the spawner in Creative mode. Bedrock commands cannot set the mob, the delay or the range.

How far away does a spawner work?

By default it runs while a player is within 16 blocks. Change Player range to make it work from further away; the preview map shows the range and the area mobs spawn in.