The bug
Chain command blocks only consider the value of the gamerule maxCommandChainLength when the chain starts, but ignore any changes to it while the chain is running. This is intended, see MC-124447.
However, when the chain is stopped because the limit is reached, the gamerule value is reevaluated for the warning message. This can create incorrect warning messages.
How to reproduce
Place empty impluse command block
Place always active unconditional chain command block behind it
gamerule maxCommandChainLength 65536Place always active unconditional chain command block behind it
say Does not runDecrease
maxCommandChainLength/gamerule maxCommandChainLength 1Activate the impulse command block from step 1
Look at the log files
→ ❌ It uses the new value for the warning message: "Command Block chain tried to execute more than 65536 steps!" (should have been "1 steps")
Code analysis
See net.minecraft.block.BlockCommandBlock.executeChain(World, BlockPos, EnumFacing) (MCP name)
Linked issues
Comments 0
No comments.