1

Slimes are notoriously known for being able to split into smaller slime when killed. This happens in both editions of Minecraft, Java Edition and Bedrock Edition.

I’m making a map where a slime is present and cannot be killed except for one secret procedure whose instructions are hidden in the map. When these instructions are achieved, a /kill command kills the slime indicating that the player has completed their mission.

But unfortunately, there is one small flaw: the /kill command activates the slimes’ splitting mechanic, and it splits into medium sized slimes. But I want the slime to die immediately, without splitting.

I would prefer a command that satisfies the following conditions. If you have an answer that doesn’t satisfy them, I will still accept it, but please avoid repeating anything already said:

  • Keeps the slime’s death animation
  • Doesn’t noticeably modify the slime size

How can I achieve this?

4 Answers 4

6

There are two commands to run: (I'm assuming you're playing on 1.13+ version)

/execute as @e[type=slime] run data modify entity @s Size set value 0
/kill @e[type=slime]

The first command turns all slimes in the currently rendered chunks into baby slimes, the second one just kills them directly.

Another approach is to teleport the slimes to void, it's simpler and you don't need to deal with any drops.

/tp @e[type=slime] ~ -100 ~
1
  • Your second proposal will work in conjunction with the third proposal by Fredy31. Thanks!
    – One 2 Many
    Commented Oct 23, 2020 at 17:23
5

You could teleport it far away or into the void. You could also preform multiple kill commands. Those are two ways of solving it. If you want the death animation then kill it then teleport all the slimes far away or into the void.

3
  • Guess my coffee did not work this morning cause I wrote my whole answer then realised that your answer was basically the same thing, just with less words. Sorry!
    – Fredy31
    Commented Oct 21, 2020 at 15:03
  • Adding on to "You could teleport it far away." You can also teleport the slime to the void.
    – ginkgo
    Commented Oct 21, 2020 at 16:50
  • @Fredy31 Lol. That’s hilarious. Commented Oct 21, 2020 at 19:29
3

So I see two solutions:

  • Have a pit of lava, or if its lava slimes a deep hole that they cant jump out of, or that goes through the bedrock, or a closed room they can't escape from and teleport them to that pit. Or even, teleport them below the bedrock, if possible.

  • or make a command that kills all slimes, and in a way just make it run every .25s for a few seconds. So the slime die, separate, and then the next instance of the run comes through and kills the separated. Running it like 10 times in a row you make sure to get through the invicibility frames they may have when they are separating.

  • Or, if you want to see the kill animation (and not see them die and die again), mix both things. Run the /kill, so the player can see them die, and small time later just teleport all of them to the trash room.

Both are a little botched solutions, but I don't think you can straight kill a slime without it separating.

1
  • Just make sure to kill the mobs in the trash room every once in a while. Too much mobs closeby might make the game have a hard time. That or TP the mobs so far away the player will never have they stay spawned. I don't think the mobs have the same thing as sheeps in pens and stuff where if they existed but were unspawned by the player being far away, but spawned back when they are close. But I really don't know MC enough to know the answer to all that.
    – Fredy31
    Commented Oct 23, 2020 at 17:12
0

You can try to make a Command Block that makes the slime become small right at the end of the death animation, so that it doesn't split anymore. I'm not sure about the modern syntax, but for 1.8 I think it'd be something like the following:

/entitydata @e[type=Slime] {Size:0}  

For modern versions you might have to use /execute.

2
  • Unfortunately, entities that are in the middle of their death animation cannot be targeted with a /data command.
    – One 2 Many
    Commented Oct 21, 2020 at 19:13
  • @ExpertCoder14 Well, that's unfortunate. How about doing it just before it dies, then?
    – John
    Commented Oct 21, 2020 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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