How do I kill a certain entity in minecraft?
I am making a Minecraft map. When you stand on a pressure plate, a squid has to die. The squid is at position [831, 65, -232]
.
Best Answer
To kill your squid, if its exactly in that coordinate, use
/kill @e[type=Squid,x=831,y=65,z=-232,r=0]
This will kill all squids that are at the coordinates 831,65,-232 with a range of 0. The range of 0 means that only the squids on that coordinate will be killed.
To be a little more secure, use this command:
/kill @e[type=Squid,x=831,y=65,z=-232,r=0,c=1]
This will only kill the nearest squid that is on the coordinates 831,65,-232 with a maximum range of 0 so only the squid that is on that coordinate is killed.
Pictures about "How do I kill a certain entity in minecraft?"
How To Kill Certain Entities In Minecraft
More answers regarding how do I kill a certain entity in minecraft?
Answer 2
To find the entity name, type /summon and then press TAB to get a full list of entities.
To kill them, type
/kill @e[type=ENTITY]
where ENTITY is your entity.
To kill them at the coordinates, simply use the X, Y, and Z, tags.
Your new command should look like this:
/kill @e[type=Squid,x=831,y=65,z=-232]
Answer 3
If you want you can do it a different way by adding a tag to the squid and kill any squid with that tag.
/kill @e[type=entity,tag=tagname]
Entity would be minecraft:the entity you want and tagname is the tag's name that you put on the squid.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Brett Sayles, Tara Winstead, Elijah O'Donnell, Antony Trivet