im trying to make it so a command block emits a redstone signal if a block is there. im trying to do this in Minecraft 1.12.2.

  • What have you already tried, and did you do any research before asking? Arqade works best when you share past research/past trials, that way we can see the specific problem you're having. – ExpertCoder14 Sep 16 at 3:37

Read about the "testforblock" command: https://www.digminecraft.com/game_commands/testforblock_command.php

You can have the command block say /testforblock <x> <y> <z> <block>

Heres an example: /testforblock ~ ~-1 ~ diamond_ore

The /testforblock command works in 1.12.2

To have it continuously check, set it to repeat.

To detect when it has found the block, you can have a comparator running out from the command block.

| improve this answer | |
  • Ok sorry I'll do that next time. – darthvader1925 Sep 16 at 2:58
  • The question explicitly states that the OP is using Minecraft 1.12.2 – Ray Wu Sep 16 at 3:18
  • 2
    @RayWu /testforblock works in 1.12. What makes you think that darthvader1925 didn't take the version number into account? – ExpertCoder14 Sep 16 at 3:32
  • I have edited it. I hope this makes it more clear. – darthvader1925 Sep 16 at 3:43
  • @ExperCoder14 Thanks – darthvader1925 Sep 16 at 3:45

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.