3

I used a command block that was set to repeat with the command /summon slime and accidentally turned on a lever next to it. Now my screen is full of slimes, the world is lagging, and I can't turn off the lever as the game won't completely load. Is there a way to stop the mobs?

1
3

This is a bit of a complex way to kill the slimes, but it technically should work.

  1. Set your render distance to one chunk. By doing this, you will be able to move slightly faster while doing everything after this, as it won’t render all the slimes.
  2. Place down a command block. Make this command block a repeating one and enter this command: /kill @e[type=minecraft:slime]and add a redstone block next to this command block. This will kill all slimes rendered in your world.
  3. Turn up your render chunks. By turning up this, you will be able to kill all slimes in your visible area. Then, destroy the command block summoning all the slimes.

Source: I tested it myself for good measure.

4
  • Wouldn't that command kill everyone else? I've been in the same situation countless times in my cmd test worlds, and I knew that command for a long time, however if I'm in a village that I'd prefer to keep then... I'll have to respawn all the animals and villagers manually. Is there a command to kill all of a specific entity? – mindstormsboi Apr 18 at 17:06
  • 5
    Yes. Simply replace “!minecraft:player” with “minecraft:slime”. – OKprogrammer Apr 18 at 17:14
  • 1
    I agree with mindstormsboi, I wouldn't use this, as you risk killing any pets, armour stands, or if the player is in survival, animals that they might have, which they will have to go about replacing, which, in survival can be a lot of effort. @OKprogrammer, please consider changing your answer to the one you mentioned above, or placing a warning on it. – DM01131 May 3 at 13:17
  • @DM01131 Ok, I changed the command. – OKprogrammer May 3 at 13:58
2

There are multiple ways to remove all slimes. For all listed methods you should set your render distance and entity render distance to the lowest value possible. This will eliminate some lag by rendering less slimes.

After every method you should change everything back to how you prefer it.


The methods are listed in order of simplicity:

Method 1

  • Load the world and set the gamemode to peaceful.

Method 2

  • Load the world and type:

      /tp @e[type=Slime] ~ -300 ~
    

    to teleport all slimes into the void. (You can press open to LAN and enable cheats if you haven't.)

Method 3

  1. Load the world and type:

     /gamerule doMobLoot False
    

    (To stop slimes from dropping loot)

  2. Type:

     /kill @e[type=minecraft:slime]
    

    and repeat it at least 3 times. (To kill all slimes with different sizes)

  3. Type:

     /gamerule doMobLoot True
    

    to re-enable mob loot.


And if all of those in-game solutions fail you, there's this program called MCedit which can do all kinds of stuff including removing the command block and removing all slimes. However, development seems halted since 2016 so it might not work. MCEdit Unified is a continueation of the original MCEdit project by the community but hasn't been updated since 2017. The latest supported version was 1.11.2 but might still work. It also added support for the Bedrock editions. MCCToolChestPE is a comparable tool for the Bedrock editions and has some world conversion options.

Source

2
  • Or another option would be /kill @e[type=slime] (to kill the slimes), and then /kill @e[type=item, name="Slimeball"] (to get rid of the slimeballs, but I like your idea of using: /tp @e[type=Slime] ~ -300 ~, as it eliminates the need for the second command. – DM01131 May 3 at 13:11
  • Disabling DoMobLoot would be better as the item drops could worsen any lag. – GreenMan36 May 4 at 14:18
-2

I just disabled mobs by setting it to peaceful mode and commands, now the slimes are gone!

1
  • 4
    ....how did you disable mobs and commands? That doesn't sound like something you can do in vanilla Minecraft, unless you mean setting the world to Peaceful mode? – Ray Wu Apr 18 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.