2

How do I kill a mob that is at another mob

Carl-The-Npc's AvatarCarl-The-Npc7/3/24 8:12 pm
2 emeralds 102 4
7/4/2024 9:19 am
Carl-The-Npc's AvatarCarl-The-Npc
How do I kill a mob that is at another mob? I'm making a blackhole with only commands, the version is 1.21. I'd Really like if you do not prank me like "/kill @e" on Repeat!
Posted by Carl-The-Npc's Avatar
Carl-The-Npc
Level 3 : Apprentice Explorer
1

Create an account or sign in to comment.

4

GalaxyGaming2000
07/04/2024 12:47 am
Level 34 : Artisan Engineer
GalaxyGaming2000's Avatar
/execute at [BLACKHOLE] as @e[type=!minecraft:player,distance=..3] run kill @s

replace [BLACKHOLE] with the mob you want to execute it at, with @e[type=!minecraft:player,distance=..3] this checks for any mob expect for the player within 3 blocks of the blackhole then it kills it.
2
Carl-The-Npc
07/04/2024 9:19 am
Level 3 : Apprentice Explorer
history
Carl-The-Npc's Avatar
The problem was that the run kill @s kills the blackhole! Instead it needs to be /execute at [​BLACKHOLE] as @e[​type=!minecraft:player,distance=..3] run kill @n[​type=!minecraft:armor_stand,distance=..3]
1
Carl-The-Npc
07/04/2024 9:06 am
Level 3 : Apprentice Explorer
history
Carl-The-Npc's Avatar
Sorry that did not work, but thank you for trying! I'll experiment with that!
1
Carl-The-Npc
07/04/2024 9:03 am
Level 3 : Apprentice Explorer
Carl-The-Npc's Avatar
I'll try that out!
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome