I'm no expert on commands so I don't know if it can be done with one command, I've used one command block for each mob type, /kill @e[type=minecraft:zombie], /kill @e[type=minecraft:creeper], etc
Note that /kill will leave their drops all over the place, looking messy and possibly increasing lag, it's usually better to teleport them into the void under the world.
There is now (since 1.14.2) apparently a gamerule "/gamerule doMobSpawning false" that stops mobs from spawning naturally though they will still spawn from spawners etc, also animals would still generate with the chunks.
Or you could switch your difficulty to peaceful which removes all hostile mobs and stops them from spawning.
i need help with kill command.
I want an command to kill all hostile mobs.
I want my villagers and items to stay
like;-Item Frames etc
I used /kill @e[type=!minecraft:player] but it destroys everything except me.
I'm no expert on commands so I don't know if it can be done with one command, I've used one command block for each mob type, /kill @e[type=minecraft:zombie], /kill @e[type=minecraft:creeper], etc
Note that /kill will leave their drops all over the place, looking messy and possibly increasing lag, it's usually better to teleport them into the void under the world.
There is now (since 1.14.2) apparently a gamerule "/gamerule doMobSpawning false" that stops mobs from spawning naturally though they will still spawn from spawners etc, also animals would still generate with the chunks.
Or you could switch your difficulty to peaceful which removes all hostile mobs and stops them from spawning.
Just testing.
i Knew about one type hostile kill.
But is there no command to just kill all hostile.
(im doing this for mob farm)
Aha, you wouldn't want to use peaceful then.
So are you going to use it to kill the mobs in the mob farm or to kill mobs around it instead of lighting up or slabbing the area?
Just testing.
I want to make a button to reset the farm. i.e to remove hostiles.
P.S. Why that
Why can't you just rain arrows from the roof using dispensers