Minecraft 14w20b - How to use execute to teleport?
//ads -- adsterra.com -- native banner
?>
I am using snapshot 14w20b, and I have a problem. I have the following in a command block on a command block setblock clock:
/execute @e[type=Snowball] ~ ~ ~ tp @e[type=Pig,r=10] ~ ~ ~
I expected this to teleport all pigs within a 10 block radius of a snowball to teleport to it, if one exists. However, all pigs remained in place, and further inspection revealed they were teleporting to themselves. Why is this happening and how can I fix it?
EDIT: My goal is to teleport all pigs within range of a snowball to the snowball. How can I accomplish this?
Pictures about "Minecraft 14w20b - How to use execute to teleport?"



How do you teleport using execute?
You can teleport to any location as long as you have its coordinates. To do it, type your command like this: /tp X Y Z. So for example, if you're trying to teleport to the location 70, 70, 70, you'll type: /tp 70 70 70. Important: The Minecraft world is 64 layers deep.How do you use the teleport command in Minecraft?
if you're playing single player, typing /tpx 0 should send you to the overworld spawn.Teleportation and Entity Detection Command Block Tutorial!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Andrea Piacquadio, Sora Shimazaki, Andrea Piacquadio, Andrea Piacquadio
