mojira.dev
MC-266388

Modifier stages decrease command quota even if not executed

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

Attachments

Comments 0

No comments.

intsuc

(Unassigned)

Plausible

Commands

23w44a

Retrieved