Mojira Archive
MC-144496

Selectors have inconsistent return order

The return order for selectors is no longer consistent. I am unsure as to whether or not this is works as intended / invalid, as the default sort setting sort=arbitrary makes no promises regarding return order. However, prior to 19w08a, the return order would always be "oldest first".

To demonstrate this:

1. create a new superflat world without any entities.
2. Summon a chicken, cow, pig, and sheep, in that order
3. Run the following command: /execute as @e run say @s

If you do this in 19w07a, the output is always

[Playername] Playername
[Chicken] Chicken
[Cow] Cow
[Pig] Pig
[Sheep] Sheep

However, if done in 19w08a, the output varies.