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

    • Confirmed
    • Windows
    • 532449

      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:

        1. bug.mcworld
          54 kB
          Sprunkles
        2. image-2020-12-18-15-06-39-793.png
          15 kB
          Sprunkles

            Sprunkles Sprunkles
            Votes:
            6 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: