There are numerous reasons you might want to eliminate mobs in *Minecraft*. One of the simplest methods to achieve this is by using the /kill command. However, to effectively use this command, you need to understand its nuances. Here’s how you can utilize the /kill command to target all mobs in *Minecraft*.
How To Use the Kill Command to Kill All Mobs in Minecraft
Before you start using the kill command, ensure that you are playing in a world where cheats are enabled. If you need guidance on enabling cheats, skip to the next section.
The /kill command is straightforward; you simply type /kill into the chat box. However, without additional parameters, this command will only result in your own demise, which isn't the intended outcome. To target specific entities, you need to add some syntax before the /kill command.
To kill all mobs, use the following command:
/kill @e[type=!minecraft:player]
In this command, @e stands for all entities, and the bracketed section specifies that players should be excluded from the kill command.
If you want to target specific types of mobs, such as chickens, you can use:
/kill @e[type=minecraft:chicken]
You can also specify a distance to limit the range of the command. For instance, to kill all mobs within 15 blocks in Java Edition, the command is:
/kill @e[distance=..15]
In Bedrock Edition, the equivalent command is:
/kill @e[r=10]
To target a specific type of mob within a certain distance, you can combine these parameters. For example, to kill all sheep within 15 blocks in Java Edition, use:
/kill @e[distance=..15, type=minecraft:sheep]
In Bedrock Edition, the command would be:
/kill @e[r=10, type=minecraft:sheep]
Both versions of *Minecraft* will auto-complete these commands, making it easier to use them without memorizing the exact syntax. With a couple of tries, you'll master the /kill command.
There are other selectors besides @e that target different entities:
- @p – targets the nearest player
- @r – targets a random player
- @a – targets all players
- @e – targets all entities
- @s – targets yourself
How To Turn On Cheats/Commands in Minecraft
To use the kill command, you must play in a world with cheats enabled. If your world doesn't have cheats enabled, here's how to activate them.
Java Edition
In Java Edition, load your world, press Esc, and select "Open to LAN." In the new window, toggle "Allow Commands" to On. This enables commands temporarily; you'll need to repeat this step each time you open the world. To permanently enable cheats, create a copy of your world with cheats enabled.
To do this, go to Singleplayer from the main menu, select your world, and click "Re-create" at the bottom. In the new menu, set "Allow Commands" to On.
Bedrock Edition
In Bedrock Edition, enabling cheats is simpler. Navigate to your worlds, click the pencil icon next to the world where you want to enable cheats. In the new menu, find the "Cheats" option at the bottom right, and toggle it to On.
With these steps, you're now equipped with all the knowledge needed to effectively use the /kill command to manage mobs in *Minecraft*.
*Minecraft is available now on PlayStation, Xbox, Nintendo Switch, PC, and mobile.*