I can use /setblock to create a mob_spawner but I want to set a mob_spawner without it actually spawning any entities, just for display in a shop, yet I can't find out how to do that.
-
Do you want to see the entity inside the spawner, or for it to be blank? Do you want the flame particles and spinning animation to continue?– SirBenetCommented Dec 29, 2016 at 12:59
-
Yes I would like the entity inside the spawner but no flame particles, spinning animation can be on or off.– majusCommented Dec 29, 2016 at 16:17
2 Answers
You can accomplish this by setting the spawner's MaxNearbyEntities
:
/setblock ~ ~1 ~ mob_spawner 0 replace {MaxNearbyEntities:0}
Well one thing you could try is just having the mob spawner there and then behind it place a repeating command block behind it (make sure players cant see it) that has the following command:
/kill @e[type=Pig,r=10]
this command block is killing any pigs that come withing a 10 block radius of it
please note that if you chose this path you must be precise with the entity name for it, for example if you do /kill @e[type=pig] (with no capital p) it will go on a constant loop killing you. if this happens simply go to your properties file and disable command blocks, restart , destroy the command block turn command block back on restart again and your good hope this helps :D
-
-
Near the spawner, you would be able to see/hear pigs dying, and you could collect their drops. I don't think this is the solution you want.– user170887Commented Jan 6, 2017 at 16:29