mojira.dev
MC-119741

Relative directions in teleport are relative to player targets rather than executer.

Teleporting (teleport NOT tp) an entity to another entity uses the relative co-ords of the executer, but the rotation is relative to the target. This is not the expected result.

execute @e[type=armor_stand,c=1] ~ ~ ~ teleport @p ~ ~ ~ ~ ~

teleports the player to the armor stand but does not match the armor stand's rotation.

Example: Thanks to OSX

Further note, thanks to SirBenet:

execute @e[type=armor_stand,c=1] ~ ~ ~ teleport @e[type=pig,c=1] ~ ~ ~ ~ ~

teleports the pig to the armor stand with correct rotation, so it seems to be more of a player thing.

Another example from OSX

Comments 1

I cannot reproduce this in 1.13,

/execute as @e[type=pig,sort=nearest,limit=1] at @s run tp @p ~ ~ ~ ~ ~

give me the pig's location and facing direction properly.

Ryan Smith

(Unassigned)

Confirmed

entities, execute, player, player-data, rotation, teleport, teleportation

Minecraft 1.12

Minecraft 18w03b

Retrieved