Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-111849

The sorting of entities invoking a function in certain circumstances is in reverse order

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.17.10.21 Beta, 1.17.10.20 Beta, 1.17.0.58 Beta, 1.17.0.56 Beta, 1.16.220, 1.16.201 Hotfix, 1.16.221 Hotfix
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Platform:
      Windows 10 - PC
    • ADO:
      532449

      Description

      The bug

      When several entities call a function within another function, the selected order of entities is in reverse order. Selectors should have consistent sorting—that is, from nearest to furthest.

      Steps to reproduce:

      • Open the provided world, stand near one of the sets of stairs, and run /function sort_entities.
      • Observe the results. The chat will print the following: a regular /tellraw message listing the three entities by name; each entity will call a function that prints their own name in chat; and each entity will print their name in chat without calling a function.
        The expected behavior is all three should sort the entities the same way, but the "With function:" line prints the entities in reverse order.

      (Note that this problem does not occur if the same command within the "sort_entities" function is called directly in chat.)
      /execute @e[type=bug:sample_entity] ~ ~ ~ function print_name

      If the list of entities was 1, 2, and 3, the results should print this:

        Attachments

          Activity

            People

            Reporter:
            Sprunkles Sprunkles
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: