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

Target selector arguments x_rotation and y_rotation don't fully respect ranges if only one end of the range is given

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16 Pre-release 2, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w30a, 1.16.2, 20w48a, 21w11a, 21w15a, 1.17.1, 1.18 Release Candidate 3, 1.18.1
    • Confirmed
    • Commands

      The Bug

      Target selector arguments x_rotation and y_rotation don't fully respect ranges if only one end of the range is given.

      How To Reproduce

      Look into the sky, your x_rotation is <0. Use this command:

      /execute if entity @s[x_rotation=80..]
      

      The feedback is Test passed, count:1, but your x_rotation (the last number on the `Facing` line on the F3 screen, it changes when you look up and down) is <0, not >=80.

      This command only fails if your x_rotation is between 0 and 80.

      This bug also exists for the y_rotation argument, but doesn't exist for other times ranges are used.

      Workaround

      Define both ends of the range.

      /execute if entity @s[x_rotation=80..90]
      

            Unassigned Unassigned
            paint Paint
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: