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

Commands that locate test instance blocks are slow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 25w03a
    • None
    • Plausible
    • Commands, Performance

      Commands such as /test pos search within a range of up to 200 blocks (plus a duplicate range of 15 blocks), meaning a server that runs this command without a nearby test instance block will be very slow. This is because the command checks block states in an non-optimal manner.

      The effect on the game is that it's very easy to slow down and eventually crash a server by putting /execute as @p run test pos x in a repeating command block.

      This issue could be mitigated by using the Chunk#forEachBlockMatchingPredicate method, which should be a lot more efficient as it checks the palette of chunks rather than scanning the chunk's block states. It all goes full circle

            Unassigned Unassigned
            haykam haykam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: