0

I've been experimenting with command blocks in Minecraft Pocket Edition, and I decided to have repeating command blocks to set the time to day. Since then, I don't want them anymore. Is there a command I can put in a command block to test if there are any command blocks within a certain radius, or does radius only work with players?

  • there's no good way to test for a block within a radius of a player, but if you don't care about deleting the blocks you can fill-replace the are you think its in. – Venya Apr 15 '17 at 1:16
2

Use the /testforblock command, where <position: x y z> is the position of the block to be tested and <tileName: string> is the block ID of a block. So you would want to do

testforblock <x> <y> <z> minecraft:repeating_command_block

Refer to the official wiki: http://minecraft.gamepedia.com/Commands

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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