How do I use command blocks to test for multiple blocks(a specified block)? I've been looking and no website will tell me. I have tried using many test for block but just lined up, but it takes long amounts of time and is very tedious.


You can chain execute detect, for example like this:

/execute if block ~ ~-1 ~ gold_block if block ~ ~2 ~ diamond_block run say hi

This makes every player who stands on a gold block and under a diamond block say "hi".

  • this is very helpful... i was using it to make a minigame thankz – Xevikan Feb 20 '18 at 20:28
  • You can mark it as accepted to indicate that it solved your problem. – Fabian Röling Feb 20 '18 at 20:36
  • 1
    1.13 syntax: /execute if block ~ ~-1 ~ gold_block if block ~ ~2 ~ diamond_block run ... – pppery Jul 12 at 23:35

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.