0

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.

1

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}
| improve this answer | |
1

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!

| improve this answer | |
  • While easier for a basic mob, this is much more limited than directly setting NBT data. – Skylinerw Dec 28 '16 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy