Minecraft – teleport a player when stepping on specific coordinates

minecraft-commandsminecraft-java-edition

Currently I try to understand command blocks in minecraft. The next step I try to achieve is to teleport a player, when he steps on a block at specific coordinates. I found many solutions about that, but the solution is always for a case that a player steps on a block (e.g. stone). But I try to execute the command only when the player steps on one specific block. I found this thread which is exactly what I need.

But for some reason it doesn't work. I guess I'm doing something wrong, but I can't figure out what. I try to execute a command when the player steps on the block at coordinates x=-637 y=67 z=620. So I placed a command block below this coordinates and entered the following command:

/execute @a[x=-637,y=67,z=620,r=1] ~ ~ ~ tp @p -640 67 625

But as I said before, it doesn't work. I don't want to do it with a pressure plate. The player should not see that there's something special. I'm using Minecraft version 1.10.2.

Any help very appreciated.

Best Answer

I will test this when I get access to a desktop, but I belive tp @a[x=?,y=?,z=?,r=1] x y z on repeat should work. It worked for me in 1.7, but I haven't tested this on 1.10 yet.