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

the way /debug and /forceload works contradicts the brigadier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.19, 22w24a, 23w04a, 23w05a
    • None
    • Unconfirmed
    • (Unassigned)

      With the brigadier having been used since 1.13, the way to handle the fail of a command changed. To make a command failed, a "com.mojang.brigadier.exceptions.CommandSyntaxException" should be thrown in order to notify the brigadier.

      However, in /debug, and /forceload, under some certain conditions, no expception is thrown when the command fails, instead, they merely send a red message to executor.

      As a result, when executing in a command block or by an /execute command, they're considered to be successful even if they should be failed.

       

      related to MC-136904

       

      For example:

      in a world that there's no force loaded chunk.

      /scoreboard objectives add success dummy

      /scoreboard objectives setdisplay sidebar success

      /execute store success score @s success run forceload query

      Although a red message is displayed, the score become 1.

      Expected behavior:

      it should be failed, and the score become 0

            Unassigned Unassigned
            Chixvv Dl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: