Minecraft – How to use /kill to kill Mooshrooms with a specific name and within a certain radius

minecraft-commandsminecraft-java-edition

I've been working on a machine and require the command to kill all Mooshrooms with a certain name and in a specific radius. I have tried:

/kill @e[type=Mooshroom,r=(radius),name=(name)]
/kill @e[type=Mushroom_Cow,r=(radius),name=(name)]
/kill @e[type=Mushroom_cow,r=(radius),name=(name)]
/kill @e[type=MushroomCow,r=(radius),name=(name)]

And none work. The command /kill @e[type=MushroomCow] seems to work in chat, but not in command blocks.

Now, I don't actually mind about the name too much, so if anyone could tell me the command to just kill Mooshrooms within a certain radius, that would be great thanks!

Best Answer

The following command, which you have given in your question, should work:

/kill @e[type=MushroomCow,r=(radius),name=(name)]

If it does not, then it is not the command itself causing the problem. Make sure that:

  • You are correctly typing/copying the command
  • You are replacing (radius) and (name) with an integer number and string without spaces respectively, e.g: /kill @e[type=MushroomCow,r=10,name=Dave]
  • The entities you are trying to target are within 10 blocks of the command block, have the name you are entering, and are MushroomCows.
  • The MushroomCows have proper UUIDs (should only be a problem if they're summoned in and you've messed with it)