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

The order, in which execute runs the command for each entity, is in reverse

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 17w45a
    • Fix Version/s: Minecraft 17w45b
    • Labels:
      None
    • Environment:

      Windows 10
      Java 1.8.0_25 64Bit

    • Confirmation Status:
      Confirmed

      Description

      As the Description tells already, execute runs each command, starting from the last entity in the list from an entity selector.

      Steps to Reproduce:

      1. (Empty world) Place down an armor stand and stand besides it
      2. run
        say @e[sort=nearest]

        and it will print out <your username>, armor stand which is the expected behavior, you are nearer to yourself than the armor stand

      3. run
        execute as @e[sort=nearest] run say hi

        and it will print out the armor stand before your username

      Despite the order in the entity selector is correct, as seen in the first example, the execute goes through this list, starting at the back, which is not the expected behavior in my eyes.

        Attachments

          Activity

            People

            • Assignee:
              dinnerbone [Mojang] Dinnerbone (Nathan Adams)
              Reporter:
              Possseidon Dominik Vogel
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: