mojira.dev
MC-254541

Command teleport using relative coords changing dimension applies coordinate_scale only to the relative.

Stand in the over world at 800 64 800 use this command:
execute in minecraft:the_nether run tp @s ~ ~ ~
...and you will NOT be at the exact same coordinates, but at 1/8th the coordinates -> 100 64 100.

Stand in the over world at 800 64 800 use this command:
execute in minecraft:the_nether run tp @s ~800 ~ ~800
...and you will NOT be at the added coordinates, nor will you be at the 1/8th of the added coordinates, but instead you will be at 1/8th the relative plus the full additional 800 -> 900 64 900.

Comments 4

Absolutely intended, if you want it scaled, run positioned x y z in ... run teleport ~ ~ ~

https://www.minecraft.net/en-us/article/minecraft-1-16-2-pre-release-2

Execute in now respects dimension scaling

You set the exact coordinates after changing the dimension, not before, so you entered the dimension, then went to those coordinates.

I understand. It's more complicated than that, apparently, because once a survival player has changed dimension, you can't continue to manipulate that player's position in the new dimension in same tick without weird coordinate anomalies... UNLESS the player is in creative mode!

If you teleport a player in survival mode across a dimension as a first command, and then in the same tick run a recursive-style mcfunction to move same player to a new location based on score (which uses relative and additional coordinates)...

e.g.
execute at @s run tp @s[scores={gat_xPos=256..}] ~256 ~ ~
scoreboard players remove @s[scores={gat_xPos=256..}] gat_xPos 256

...the player in survival mode doesn't move in the same tick as expected at all. Strangely, in creative the player does move in the same tick as intended.

The best work-around I've come up with is to first change the player's dimension in the first tick, and then schedule the recursive teleportations to occur all at once one tick later.

That would be a very different issue than what you reported here.

I'm with @unknown on this one. /execute in minecraft:the_nether changes the command's execution context to 100 64 100 in the Nether. Then tp @s ~800 ~ ~800 is run from these coordinates, teleporting you to 900 64 900.

As for the issue mentioned in your comment, I'm not able to reproduce it. Please create a new ticket for that if you're still able to.

Gatinh0

(Unassigned)

Unconfirmed

(Unassigned)

1.19

Retrieved