Command Block Effectiveness Range

Can you be too far away for a command block to work? (ie. command does not execute)

I am curious because I was making a super-flat world a void one by filling a 7x7x4 zone around the player with air to clear it. But as I got farther away from the repeating command block, the space around me was not being filled. However when I got close enough to the command block, the command executed successfully. There is no radius limiter in the command itself, so I was wondering wether or not there is a hard-coded range limiter for command blocks.


Solution 1:

Commandblocks only run while they are loaded. Because bedrock doesn't have spawnchunks like Java that are always loaded, once you're too far away (determined by your simulation distance) the chunks the commandblock is in are unloaded and it stops working.

To make sure the chunk that the commandblock is in stays permanently loaded, you can use the tickingarea command.

For example, assuming your commandblock is located at 10 20 30:

tickingarea add 10 20 30 10 20 30

and once you're done you should remove it again

tickinarea remove 10 20 30