I have tried Youtube videos, tutorials, Minecraft wiki, and many different types of commands. If I tried: /setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:RabbitType:99}
or /setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:KillerRabbit}
it will just give me an empty spawner with nothing in it. The same goes for the Ender Dragon commands. Can anyone give me an explanation please?
1 Answer
Extra entity data goes inside the SpawnData
compound. The correct tag name is RabbitType
rather than Type
. Tags are separated with commas.
Fixed command for 1.8:
/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {EntityId:Rabbit,SpawnData:{RabbitType:99}}
Fixed command for 1.9, where EntityId
no longer exists and the ID is instead defined by the id
tag inside of SpawnData
:
/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {SpawnData:{id:Rabbit,RabbitType:99}}