[URGENT/BLOCKING] /execute + tp does not (or at least not accurately) use the entity's floating point coordinates as the origin.
Verification builds: Release_466466 (In full release of 1.2 as well)
Summary:
I've been reporting a number of teleporting related issues recently, all of them heavily impact our map in 1.2 and seem to be a result of adding floating point coordinate support in teleports. While this works fine when using a regular /tp command, I believe that a large portion of the problem comes from the fact that /execute is using the entity's INTEGER coordinates rather than their floating point values. However, this is just a hypothesis. I don't know if that is what happens in the code. But in either case, it doesn't do it accurately. Among all the issues we've encountered with /tp in conjunction with /execute, this is the most pressing. A brief demonstration can be seen in this video: https://youtu.be/myBQE7l5Tr8. In the system shown, every time the pocketwatch is thrown, the player is switched between two identical and perfectly aligned environments separated by 100 blocks vertically. The way we do this is using one of two commands:
1. /execute @p ~ ~ ~ tp @s ~ ~100 ~
or 2. /execute @p ~ ~ ~ tp @s ~ ~-100 ~
What this SHOULD do is transport the player to the EXACT same place in the opposite environment. However, in the video, if you look at the player's XYZ coordinates, you can see that that is not the case.
Impact: Our primary mechanic of time travel is not smooth and our finale puzzle is entirely unworkable. Without this fix before 1.2, we will have to entirely pull our most complex puzzle.
Repro Steps: Here is a much simpler way to see this in action than shown in the video. Open up the F3 screen and note your XYZ coords (decimals and all). Then, run this command:
/tp @p ~ ~100 ~
Now, note that you stayed in the exact same location, as expected. Therefore, you would expect the following command to have the exact same result, but it doesn't:
/execute @p ~ ~ ~ tp @s ~ ~100 ~
Instead, you are aligned to the x.00 y.00 z.00 coords.
Observed Results: The execute command seems to use the floor() function on the entity's coordinates for the executing point.
Expected Results: The execute command should use the EXACT point of the entity for execution. /execute @p ~ ~ ~ tp @s ~ ~100 ~ SHOULD produce the exact same result as /tp @p ~ ~100 ~
Screenshots/Videos attached: Yes
Notes:
This has extremely far reaching implications throughout our ENTIRE map and we are in URGENT need of a fix. Not only that but this prevents seamless teleports altogether for any mapmaker, a very common and well-used mechanic.