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]
.
Solution 1:
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.
Solution 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]