Custom Mob Spawners allow adventure map creators to build intense dungeon encounters. You can control which mobs spawn, what gear they wear, how fast they spawn, and what items they drop upon death.
Custom Spawner Tag Structure in Minecraft 26.x (26.1/26.2)
Mob spawners use the SpawnData block entity tag:

/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"minecraft:zombie",ArmorItems:[{},{},{},{id:"minecraft:diamond_helmet"}]}},SpawnCount:4,SpawnRange:6,MinSpawnDelay:100,MaxSpawnDelay:300}
Editing Loot Tables for Custom Drops
Rather than dropping default rotten flesh, you can assign a custom JSON loot table path to any mob using the DeathLootTable NBT tag.
Design spawner blocks visually with our Mob Spawner Generator and build loot tables with our Loot Table Generator!
Test a custom spawner without risking a survival world
- Create a flat test world with commands enabled.
- Generate a spawner with one mob type and conservative delay and nearby-entity values.
- Place it away from other mobs and watch several complete spawn cycles.
- Add equipment, attributes or custom loot only after the base spawner behaves correctly.
- Verify drops with repeated kills instead of assuming one result proves the loot table.
Separate entity data from loot rules
A spawner controls what appears and how often it attempts to spawn. A loot table controls eligible drops, rolls, conditions and functions. Keep these systems in separate files or command sections so a loot error cannot be mistaken for a spawner timing problem.
Very short delays or high nearby-entity limits can create an uncontrolled number of mobs. Always provide a shutoff or remove command during testing.
