1

Range between entities?

olik400's Avatar olik4009/7/15 1:05 pm
1 emeralds 209 4
9/8/2015 10:54 am
CommandFox's Avatar CommandFox
In minecraft you can ad a NBT tag called maximum range or minimum range.
example:
/kill @e[r=3,type=Zombie]
but when you put this in a command block it counts the range from the command block.
Is there any way how to kill Zombies in range of 3 blocks from an (examlpe)Villager?

pls help

-olik400
Posted by olik400's Avatar
olik400
Level 1 : New Explorer
0

Create an account or sign in to comment.

4

1
09/08/2015 10:54 am
Level 11 : Journeyman Engineer
CommandFox
CommandFox's Avatar
Please remember the coordinates at the /execute command (~ ~ ~ to execute at the entity that you're executing from's original position):

/execute @e[type=Villager] ~ ~ ~ kill @e[r=-3,type=Zombie][/
1
09/07/2015 1:48 pm
Level 22 : Expert Network
YTCereal
YTCereal's Avatar
/execute @e[type=Villager] kill @e[r=-3,type=Zombie]

fixed some errors
1
09/07/2015 1:43 pm
Level 17 : Journeyman Dolphin
Patchpen
Patchpen's Avatar
/execute can be used to make something other than a command block execute a command.

for example: /execute @e[type=Villager] kill @e[r-3.type=Zombie]

Would execute the kill command from the villager.
1
09/07/2015 1:13 pm
Level 65 : High Grandmaster Wolf Whisperer
Myyoyo
Myyoyo's Avatar
Use coordinates
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome