Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-124686

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w22c
    • Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w11a, Minecraft 18w16a, Minecraft 18w19b
    • Confirmed

      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.

            dinnerbone [Mojang] Nathan Adams
            brianmcn Brian McNamara
            Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: