My friend created a clock with a command block that teleports me to one place on my singlepalyer world.

How can I disable command blocks and get unstuck from this infinite loop?

  • Quit. Don't rejoin the server. – Frank Mar 7 '15 at 22:17
  • 3
    @Frank Title says "single player" so I doubt this is a server. – SirBenet Mar 7 '15 at 22:24
  • @colorfusion If a friend has made a never ending loop, then I expect someone joined at some point. Regardless, don't you have to choose a world when you first log in? If so, then just don't choose that world. – Frank Mar 7 '15 at 22:27
  • 3
    @Frank You don't need to host a server to have a friend play on your world. Abandoning the entire world is clearly not the solution that OP is looking for. – SirBenet Mar 7 '15 at 22:28

Unfortunately there isn't a good way to fully disable all command blocks in singleplayer, you'll need to remove the command block (or the clock) to disable it.

One option is to download the server software from minecraft.net, temporarily host the map as the server, then turn enable-command-block to false in the server.properties and use the fact that you're not being teleported to break the command block.

This requires somewhat knowing where the command blocks are. Going into /gamemode 3 to noclip should help. The command block has to be in loaded chunks if it's activating, so looking around spawn is a good start point, or asking your friend where they put it.

As an alternative, you can download an external map editor such as MCEdit to remove the command block. With MCEdit, you can load up the world, fly around unaffected by the teleporting, and also turn on the ability to see TileEntities through other blocks to help locate the command block:

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.