Kill command keeps killing me

I'm trying to kill all Iron Golems around me, and I thought "Simple, this command should be enough!"

/kill @e[type=IronGolem,r=100]

Whenever I run that, it just kills myself though. What have I got wrong with the command? Or is it an issue because I'm in 1.7.10 (for mods)?

3

4 Answers

Prior to 1.8, the /kill command does not have an optional target argument. From the 1.8 change log:

  • /kill
    • Can be followed by a target selector.
    • Example: /kill @e[type=!Player]

In 1.7.10 (and earlier versions), it will always kill the player running the command.

The version you are using causes this.

The @e target selector was added in 1.8.0, therefore you can't do this in 1.7.10.

You can view the wiki post about version 1.8 here.

I googled a bit in hope to find a mod that allows killing all mobs in a specific type for 1.7.10, but I was unable to find any.

2

CoFH Core actually does what you want for 1.7.10.

The command is /cofh killall [entity].

/kill @e[type=VillagerGolem] should work.

You Might Also Like