-
Bug
-
Resolution: Fixed
-
24w38a
-
None
-
Confirmed
-
Commands
-
Very Important
-
Platform
Relative teleport commands appear to be measured as relative to the target but applied relative to the context, resulting in unexpected behavior. For example, this function:
tp @s ~5 ~ ~ tp @s ~ ~ ~
Expected behavior: player is not moved at all
Actual behavior: player is moved 5 blocks in the negative X direction
It appears as though the player moves +5X, then the second command tries to put them back to the context position, which is a relative move of -5X from their current position, but it applies that -5X to the context position instead of the player's position, resulting in the player moving from +5X to -5X.
For another example:
tp @s ~ ~ ~5 tp @s ~ ~ ~5
Expected behavior: player is moved 5 blocks in the positive Z direction
Actual behavior: player is not moved at all
Again, it appears that the player moves +5Z, then the second command tries to put them there again, which is a relative move of 0Z from the new position, but it applies that 0Z to the context position, putting the player back where they started.