mojira.dev
MC-102740

Teleporting players with relative coordinates behaves like before 16w21b when used in a command block [minecart]

According to the changelog, /tp with relative coordinates now teleports relative to the executor, not the target. However, when command blocks teleport players, the command seems to teleport relative to the target.

to reproduce:

1. create a superflat "redstone ready" world
2. Place down a repeating command block
3. set the command to

/tp @p ~ 58 ~

4. set the command block to "always active"

5. you will notice that, despite reporting the correct coordinates in the logs, the player will be teleported according to their current coordinates.

Linked issues

Attachments

Comments 10

Small correction, if you teleport another player relative, it is relative to you.
The one that doesn't work here is the command block, command blocks don't teleport relative to themselves.

Changing title and description accordingly.

added players back in the description. Teleporting nonplayer entities works no problem.

Yes, you seem to be correct about that, tested it with an item, and some glitchiness happened.

I want to mention that "/execute @e[type=!Player] /tp @e[type=Player] ~ ~1 ~ " is teleporting a player 1 block higher when there is one other entity. It should teleport player to 1 block above another entity.

Please check in the next snapshot (tomorrow) if /teleport has this problem, the behaviour for /tp has been reverted in that one.

https://twitter.com/SeargeDP/status/737975391885905920

@unknown I would recommend naming this command /tpfixed instead of /teleport, since tp can be interpreted as short form for teleport.

It will be named teleport, tp will become depreciated and st one point removed.

😞 no reason to remove it tho. And tpfixed is shorter and more descriptive.

Anyway, please check in the next snapshot/prerelease tomorrow.

From my testing in 1.10pre1 it seems to be invalid for /tp and fixed for /teleport. Not sure how it should be resolved...

Ely G

(Unassigned)

Confirmed

Minecraft 16w21b

Minecraft 1.10 Pre-Release 1

Retrieved