Mojira Archive
MC-124686

teleport's rotational arguments use sender's rotation rather than context's rotation

summon armor_stand ~ ~ ~ {NoGravity:1b}

Go fly somewhere looking in some diagonal direction

execute as @e[type=armor_stand] run teleport @s ~ ~ ~ ~ ~

EXPECTED

armor stand gains my position as well as my facing rotation

ACTUAL

armor stand gains my position but preserves its existing facing rotation


It appears that currently teleport is bugged so that the rotation arguments (4th and 5th arguments of that teleport 'overload') use the sender's rotation rather than the context's rotation. You can see that with e.g.

teleport @e[type=armor_stand] ~ ~ ~ ~ ~

which does change the facing. As well as

/execute rotated ~20 ~ run teleport @e[type=armor_stand] ~ ~ ~ ~ ~ 

which still gains my facing, not mine+20.


To be clear, here is what I imagine makes the most sense for teleport:

teleport @s ~ ~ ~        changes position to context position, preserves existing rotation
teleport @s ~ ~ ~ ~ ~    changes position to context position, changes rotation to context rotation

After this bug is fixed, you would have an armor stand keep its location but gain the facing rotation of the player with

execute as @e[tag=AS] at @s rotated as @p run teleport @s ~ ~ ~ ~ ~

Possibly a duplicate of the more general MC-125772.

Fixed

Brian McNamara

[Mojang] Nathan Adams

2018-01-31, 09:55 PM

2018-05-31, 12:08 PM

2018-05-31, 12:08 PM

10

10

Confirmed

/teleport

Minecraft 18w05a - Minecraft 18w19bMinecraft 18w05a, Minecraft 18w06a, Minecraft 18w11a, Minecraft 18w16a, Minecraft 18w19b

Minecraft 18w22c