-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 19w04b, 20w13b, 23w41a
-
Confirmed
-
Commands
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 65536
- Place always active unconditional chain command block behind it
say Does not run
- Decrease maxCommandChainLength
/gamerule maxCommandChainLength 1
- Activate 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)
- relates to
-
MC-124447 Modifying maxCommandChainLength inside of function or command blocks does not affect currently running chain
- Resolved