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

Modifier stages decrease command quota even if not executed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 23w44a
    • None
    • Plausible
    • Commands

      The bug

      Modifier stages of a command decrease command quota even if they are not executed. This causes the command quota to be consumed in a counterintuitive manner.

      How to reproduce

      1. /scoreboard objectives add mc-266388 dummy
      2. /gamerule maxCommandChainLength 3
      3. /scoreboard players set # mc-266388 0
      4. /function mc-266388:f

        A is printed. This behavior would be correct; the function call and execute if score # mc-266388 matches 1 each consumes 1 command quota, leaving 1 for say A.

      5. /function mc-266388:g

        A is not printed. This behavior might be incorrect; the function call, execute if score # mc-266388 matches 1, and the second if score # mc-266388 matches 1, which is not executed in this case, each consumes 1 command quota, leaving 0 for say A.

      data/mc-266388/functions/f.mcfunction
      execute if score # mc-266388 matches 1 run seed
      say A
      
      data/mc-266388/functions/g.mcfunction
      execute if score # mc-266388 matches 1 if score # mc-266388 matches 1 run seed
      say A
      

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

              Created:
              Updated:
              Resolved:
              CHK: