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

Entities are sorted with Bogosort when using [sort=nearest] and [sort=furthest]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.4, 24w06a
    • None
    • Unconfirmed
    • (Unassigned)

      I appreciate that you can sort entities by distance but why does Minecraft use the Bogosort algorithm? This algorithm is very inefficient unless you are lucky. To reproduce just run a command with [sort=nearest] or [sort=furthest]. The time how long it takes to sort will be random.

            Unassigned Unassigned
            NoUser No User
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: