mojira.dev
MC-121728

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

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.

Comments 0

No comments.

Possseidon

Nathan Adams

Confirmed

Minecraft 17w45a

Minecraft 17w45b

Retrieved