How do I change a spawner's type in Minecraft?

I want to change the type of my mob spawners on my server. My server is a vanilla server, as it has no mods. Is there a way I can edit it without mods? If not, is there a mod I can get to change them?


Method 1: Programs and whatnots

(Please refer to MBraedley's answer for the main points. This is just an add-on to it/repeating what he said.

The Program MCEdit has a mob spawner editing function. Simply left click the spawner with your mouse released.

The Essentials Bukkit plugin allows the changing a spawner type. Just point your cursor at the spawner and use /spawner [new mob type].

The NotEnoughItems (NEI) mod allows the spawning of mob spawners with pre-existing metadata. Just spawn one in from the side menu and place it down. (Note: Does not work without the NEI mod)

Method 2: Vanilla Minecraft

With the introduction of the /setblock command, and it allowing the choosing of NBT tags...

/setblock <x> <y> <z> <block_id> <block_damage> <old_block_handling> <tile_entity_data>
/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:<ENTITY ID>,SpawnData:{<MOB NBT TAGS>}}

The EntityId tag within the mob spawner's Tile Entity allows the player to define what entity it spawns. However, if the SpawnProtentials tag is defined (and is compounded with entries within it), the EntityId tag will have its value changed based on the weights within the SpawnProtentials tag.

Not defining one (a SpawnProtentials tag) will result in the mob that you have defined to indefinitely spawn.

The EntityData tag can be added (is optional) and is used to define the entity it spawns. For example, adding EntityData:{NoAI:true} would make everything it spawn not have any AI.

Not defining one will default to the default NBT values for the entity you've defined.

See the Command Blocks NBT section of the wiki to see the other tags.
Also note that the data value of the spawner does nothing.


You can modify blocks (as pointed out by MBraedley with the /blockdata command.

Simply look for a spawner and use the following command:

/blockdata <x> <y> <z> <new_data>
/blockdata <x> <y> <z> {EntityId:[New Entity to spawn],SpawnData:{[Any mob NBT Info}}

All NBT tags found on the wiki can be used here too. Just note that existing NBT tags (that you have not defined) when using this command will not get overridden or removed.
/blockdata only creates new or changes existing NBT data. It does not delete any.

So, a (let's say Zombie) with {customName:"Creeper",NoAI:1} had the command /entitydata @e[type=Zombie,r=3] {customName:"Zombie",IsBaby:1} executed on him.
The resulting mob will still have the NoAI tag. (Results in: {customName: "Zombie",IsBaby:1,NoAI:1}.
The same principle occurs for /blockdata.


Without further ado, try:
And then place a redstone torch/block/whatever beside/behind/on top/underneath/whatever it..

/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:Item,Delay:1,SpawnData:{Item:{id:"diamond",Count:1},PickupDelay:1}}

Moar Diamonds!

/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:Zombie,Delay:1,SpawnData:{IsBaby:1,Riding:{id:Chicken}}

Or something from this little short.


Alternatively, https://gaming.stackexchange.com/a/197633/75275 (scroll down)


As of 1.8 (Snapshot 14w28b) you can now change what the mob spawner spawns by "using" a spawner egg on it.

Normally mob spawners only spawn

  • Spiders (including Cave Spiders as of 1.8)
  • Zombies
  • Skeletons
  • Blazes (Nether)
  • Siverfish
  • Pigs (when initially placed in Creative)

However, using this technique, you can now spawn any mob you wish, from villagers to Endermen, so long as it has a spawn egg you can use.

Some mobs you should be careful with however, are:

  • Creepers, for their natural ability to, well... Explode. The repercussions should not need explanation.
  • Ghasts. They can't actually destroy the spawner itself, but they can wreak some havoc on the surrounding area.

The answer below, while still valid, is not representative of what's currently possible. @aytimothy's answer describes how this problem can be solved in vanilla Minecraft.


As @SaintWacko said, there is no way to edit spawners in vanilla Minecraft, even in creative mode. MCEdit will let you do this, though. It's a separate program for editing worlds. It's probably not the best tool for the job, and you'll have to know where the spawners are that you want to change in order to do the work effectively. You'll also have to take the server offline while you do the work. This also assumes you can sit down at the server, or at least get a remote desktop of it, otherwise you'll have to transfer the world to your home machine to do the work.


In 1.8 and later you can use(default right-click) spawn egg on the mob spawner to change the spawner type. This will make the spawner same as vanilla-generated spawners. But if you want to change the spawn properties or do something more advanced, you have to use /blockdata command. Check out these pages :

  • /blockdata command
  • Command NBT
  • NBT Format
  • Block Entity Format
  • Entity IDs