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

Execution order is reversed when calling a function in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w10c, Minecraft 18w21b, Minecraft 18w22a, Minecraft 18w22b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 18w43c, Minecraft 19w14a, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4
    • None
    • Confirmed
    • (Unassigned)

      How to reproduce

      • Summon 3 armor stands
        summon minecraft:armor_stand ~ ~ ~ {CustomName:"\"Main\"",CustomNameVisible:1b,Tags:["foo"]}
        summon minecraft:armor_stand ~1 ~ ~ {CustomName:"\"One\"",CustomNameVisible:1b,Tags:["bar"]}
        summon minecraft:armor_stand ~2 ~ ~ {CustomName:"\"Two\"",CustomNameVisible:1b,Tags:["bar"]}
        
      • make 2 functions
        #to:foo
        execute as @e[tag=foo] at @s as @e[tag=bar,sort=nearest] run function to:say
        
        #to:say
        say Hello
        
      • /reload and run /function to:foo in chat
        → Notice that "Two" prints its name in chat before "One" while it is further away

      Note: When replacing sort=nearest with sort=furthest "One" will print its name first confirming the bug that they are swapped.

            boq [Mojang] Bartosz Bok
            Misoloo [Helper] Misode
            Votes:
            16 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: