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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 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
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: