Is it possible to use commands or redstone devices (or a combination) to detect for a specific block placed in a specific coordinate and output a redstone current if so?

For instance, if I place a stone block in the coordinates (1,2,3), a command block will execute.

I'm sure /testforblock could be useful, but I just can't figure out how. All that does is tests if a block is there; it doesn't do anything if that resolves to true.

Assume version 1.12, if that makes things easier.

Bonus points: Same thing, but detecting if a specific entity is in the supplied coordinates. Again, /testfor seems useful, but I'm unsure how.

  • What's with the down vote? – DonielF Jun 12 '17 at 10:30

If you place a comparator in front of a command block with

testforblock x y z

Then it should yield a redstone signal. You may want to place a repeater in front of the comparator.

A visual guide:

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.