I am working on a castle build and mobs keep spawning in the area. I know that using lamps work. but is there away to use commandblocks to stop the spawning around the area but still keeps mob spawning on the outside.
You can teleport mobs within a certain distance of the point or within a certain box into the void.
Unless you want to remove all entities except players, including minecarts, item frames etc, you'd need one command block per mob type (zombie, spider etc).
--
For instance:
/tp @e[type=zombie] ~ -10 ~
or you could teleport them somewhere else if you wanted the drops or to fill up the mob cap and stop more from spawning, but repeating command blocks should remove them fast enough that you didn't notice them.
ok I did that it just says @e[type=zombie] does not exist. I typed it the same way so why did it not work? is it because I am doing it on a commandblock? or do I need to do it in chat.
Thanks for your reply but, the post you responded to is over a month old... and he(?) also said he didn't want to eliminate all mob spawning, just where he was working.
I am working on a castle build and mobs keep spawning in the area. I know that using lamps work. but is there away to use commandblocks to stop the spawning around the area but still keeps mob spawning on the outside.
You can teleport mobs within a certain distance of the point or within a certain box into the void.
Unless you want to remove all entities except players, including minecarts, item frames etc, you'd need one command block per mob type (zombie, spider etc).
--
For instance:
/tp @e[type=zombie] ~ -10 ~
or you could teleport them somewhere else if you wanted the drops or to fill up the mob cap and stop more from spawning, but repeating command blocks should remove them fast enough that you didn't notice them.
Just testing.
ok but what's the command to do that?
For instance:
/tp @e[type=zombie] ~ -10 ~
Don't forget to do
/gamerule commandBlockOutput false
to keep chat from being spammed by the output of the command blocks.
Just testing.
ok I did that it just says @e[type=zombie] does not exist. I typed it the same way so why did it not work? is it because I am doing it on a commandblock? or do I need to do it in chat.
Maybe you should simply switch to "Peaceful" while building and then switch back once you've done?
Where I get excellent maps and addons: mcpedl.org. I don't know any other websites lol.
/gamerule doMobSpawning False
Thanks for your reply but, the post you responded to is over a month old... and he(?) also said he didn't want to eliminate all mob spawning, just where he was working.
I might also try Zombie rather than zombie.
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf