I have tried to make them by using this for example:

/setblock ~0 ~1 ~0 mob_spawner 0 replace {SpawnData:{id:{ZombieType:6},SpawnCount:1,SpawnRange:4,maxNearbyEntities:6,Delay:20,MinSpawnDelay:60,MaxSpawnDelay:120}

But it just makes a pig spawner. I know ZombieType:6 spawns a husk, but what is wrong with this command? The same goes for strays SkeletonType:2b is the tag but the command won't work.

2 Answers 2


Currently, you have set the id to {ZombieType:6}. A husk's id is still just Zombie, ZombieType is a separate tag that it has.

Try the following instead:

/setblock ~ ~1 ~ mob_spawner 0 replace {SpawnData:{id:Zombie,ZombieType:6},SpawnCount:1,SpawnRange:4,maxNearbyEntities:6,Delay:20,MinSpawnDelay:60,MaxSpawnDelay:120}

Here is a much easier way:

/give (minecraft username) minecraft:mob_spawner

Now get the spawn egg for the mob you want and right click with the egg in your hand on the spawner and it will change to the chosen mob!

  • While easier for a basic mob, this is much more limited than directly setting NBT data.
    – Skylinerw
    Commented Dec 28, 2016 at 22:20

You must log in to answer this question.