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

The x-rotation of /teleport is limited to ±90 degrees relative to the entity's original angle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.4
    • None
    • Confirmed
    • Commands
    • Important
    • Platform

      Summary:
      Starting from version 1.21.2, the x-rotation in the /teleport command, when rotated using relative angles, is clamped to within ±90 degrees of the entity's original x-rotation.

      This bug may cause existing datapacks to malfunction.

      The red sector in the attached image represents the range of possible rotation.
      In version 1.21.1 and earlier, the range of rotation was from directly above to directly below.
      However, starting from version 1.21.2, if the initial angle is -70°, the x-rotation can only be lowered to 20°.

       

      Steps to reproduce1:
      Execute the following two commands in the chat box.

      /tp @s ~ ~ ~ ~ -70
      /tp @s ~ ~ ~ ~ ~120
      

      Expected results1:
      The player's x-rotation will be set to -70+120 = 50.

      Observed results1:
      The player's x-rotation will be set to 20.

       

      Steps to Reproduce2:

      1. Place an armor stand in the world.
      2. Make the player's orientation face directly downward, and execute the command: teleport @n[type=armor_stand] ~ ~ ~ ~ ~. This will set the armor stand to the same position and orientation as the player.
      3. Next, make the player's orientation face directly upward and execute the same command again: teleport @n[type=armor_stand] ~ ~ ~ ~ ~.

      Expected Results2:
      The armor stand should face directly upward, matching the player's orientation.

      Observed Results2:
      Instead of facing the same direction as the player, the armor stand ends up oriented horizontally.
       

      Note: This issue does not affect the /rotate command.

        1. ~1_21_1.png
          240 kB
          komaramune
        2. 1_21_2~.png
          233 kB
          komaramune

            Unassigned Unassigned
            komaramune komaramune
            Votes:
            11 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: