I want to build some kind of non euclidian room in minecraft, where a player should be able to go 2..infinite amount of times around a corner, until he went full cyrcle. But it should only work in one direction. For example it might take 7 corners if you go clockwise and 4 corners counterclockwise.

Here on 0:42 you can see what i want to achive: non euclidian geometry

In order to achive that i use command blocks to teleport the player on a point A, where he faces positive x direction, relative to his own offset to point B, where he faces positive y direction: enter image description here

I tried using this command:

execute at @a[​X=A,Y=B, Z=C, distance=0..4] run tp @p ~-10 ~ ~-10 90 0

I am facing now three problems :

  1. I don't know how to check which direction the player is facing at given coordinate.

  2. When teleporting the player back while he is moving in x direction, the movement towards x stays after the teleportation. In my case i want him, if he moves in x direction before teleportation, to move in y direction after the teleportation.

  3. Since all rooms are exactly the same, the player should be teleported to the previous room facing now the previous direction. But after teleportation the position is slightly off. Imagine if you move in X direction, there are 4 possible Y coordinates to be teleported(Y1, Y2, Y3, Y4). Depending on which one you get teleported you should get to a different X coordinate (Y1 -> X1,.., Y4 -> X4), so the distances to the walls are the exact same. But how it now works is, that it doesnt matter in which Y you are, you will always get to the same X.

    For that reason I created a little formula, that would keep the distances to the walls the same, after teleportation. But i cant use the formula nor can I store the result and use it for the teleportation

Any suggestions?

  • I don't understand problem 2. When the player is teleported using your provided command, they are facing in Y direction because of the rotation in the /tp command. Should this not be a problem?
    – One 2 Many
    Commented Sep 1, 2020 at 1:49
  • Imagine you are jumping in direction x and turn by 90 degrees midair. You will face a new direction, but the motion towards x stays. That happens after teleportation, when I use my command. Instead I want the movement of the player in x direction to be directed on depending how he gets rotated .
    – Zeaser
    Commented Sep 1, 2020 at 9:21
  • Please don't post solutions in questions, even partial ones. Commented Oct 26, 2020 at 19:57

2 Answers 2


All you have to do is /tp playername coords facing another coords For example Your Name Is GachaLelouch and the coords Is 1 2 3, All you have to do is /tp GachaLelouch 1 2 3 facing 1 2 3 If you want it to point towards a player you do /tp GachaLelouch 1 2 3 facing @p This command can't work if you teleport another player to another player.. You can do /execute GachaLelouch ~~~ tp GachaLelouch2 ~~~ facing 1 2 3

  • If you are facing the same block you are standing on, you would face down. I do not think he wants to look down.
    – Penguin
    Commented Oct 23, 2020 at 14:43
  • What you are doing with your command is changing the facing direction after teleportation. What I need is to check if someone is facing a direction at a specific coordinate and if so he shall get teleported. But I found a solution to that problem, that I will mention in the description.
    – Zeaser
    Commented Oct 26, 2020 at 19:33



   execute as @p at @a[x=394,y=122,z=94,distance=0..3] anchored eyes
   facing entity @e[sort=nearest,limit=1,type=!minecraft:player] eyes   
   anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if
   entity @s[distance=0..0.3] run tp @p ~-7 ~ ~11 180 0

This command will execute if a player enters given coordinates with radius 3 and faces the eyes of the entity. The entity can be anything you want. In my case I use amor stands. Then it will anchor to the players feet and move one block towards the entity. After that it rotates to the direction the player was looking and moves one block backwards. Now if the player is found in a 0.3 radius, we can assume, that the player is looking at the armor stand and will now be teleported to given coordinates.

  • I will edit my answer to keep the standard high. Is there some kind of documentation or recomendation on what the standards are?
    – Zeaser
    Commented Oct 27, 2020 at 12:46
  • Try the help centre. The info you’ll need can be found by tapping the question mark button at the top right corner.
    – One 2 Many
    Commented Oct 27, 2020 at 14:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .