How to break a repeating command block

How do you stop an out of control, repeating command block that is lagging your realm, server or world?


When someone on your realm, you or someone else uses a repeating command block in Minecraft, things can go seriously wrong, as experienced by Randy Dreammaker of SkyThrusters Development.

Watch this video on YouTube, of what happened to Randy.

A repeating command block is a necessary and helpful tool within Minecraft when its used correctly, but a poorly designed repeating command block can create enormous amount of lag and in some situations completed brick your world by creating an unstoppable loop of code.

So what can you do when a repeating command block gets into an uncontrollable loop?

Method One:

You can have a friend or if you have a second Minecraft account, then have them log into the world in an area where the repeating block is not located.  It will need to be at least a chunk which is approximately 250 blocks away.   This should prevent their account from being impacted by the lag, since the lag is localized to the chunk its located in.  

Once inside the world, you or your friend can create a block just within the chunk where the repeating command block is located. Get close, but not close enough the lag over powers you or them.
Then if they have operator permissions allowing them to create a command block, they can give themselves the block by typing in the following into the chat box.

/give @p command_block 

Next you will need to enter in a command code to kill the entities, assuming the repeating block is summoning mobs.  View Randy Dreammaker's video for steps that show the command code.

This command code will kill all entities and players.

If you or someone else is stuck in the area of the repeating block, they should notice that they mobs begin to automatically die as they are generated, which will give them or you, the ability to destroy the repeating command block or change it ticks to a lower number or change the block to a block that requires Redstone.

Method Two:

If method one doesn't work, you can try method two.

Method two assumes that you know the location or approximate location of the offending repeating block.  In this case we will use a fill command to try to destroy the offending block without having to be close enough where lag would slow us down.



I know for example, that the block is located at 572 64 486 in this example, so I'll use a fill command that is a few blocks wider at 580 64 485


I'll enter the command as following:

/fill 572 64 486 580 64 485 sand



Using a command block with a button on it to trigger it, is a good way to implement Method Two, because it will be easy to change the location if you need to expand or change the direction of the fill command.  Most likely, several attempts will be required.

I used Sand in this illustration, only because I know that the repeating command block is located on sand, and I wanted only sand to replace the air or other blocks around it.  If I had used an iron block, then I'd have to manually remove any blocks that I create while attempting to wipe out the offensive repeating command block.


Method Three:

Method three is mainly about timing and luck. In some situations, you can lower and reduce all of your settings for the world in Minecraft to the lowest settings, turning off anything that reduces performance of your computer, especially if you do not have a graphics card.

With a little luck and time, you might be able to escape out of the area, "very slowly if there is a lot of lag", to a place where lag is reduced enough you can attempt method two and three.

You may also be able to physically destroy the repeating command block by hitting it until you're able to break it.  This can take considerable time and multiple attempts may be required.