Mojira Archive
MC-143265

Command blocks reevaluate maxCommandChainLength for warning message when chain is stopped

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

  1. Place empty impluse command block
  2. Place always active unconditional chain command block behind it
    gamerule maxCommandChainLength 65536
    
  3. Place always active unconditional chain command block behind it
    say Does not run
    
  4. Decrease maxCommandChainLength
    /gamerule maxCommandChainLength 1
    
  5. Activate the impulse command block from step 1
  6. 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)

Unresolved

Marcono1234

2019-01-28, 01:34 PM

2023-10-12, 01:11 PM

2

3

Confirmed

Commands

maxCommandChainLength

Minecraft 19w04b, 20w13b, 23w41a

-