how do I testfor blocks? like if I put down stone near a command block with a comparator attached to it and it will activate a piston connected by the comparator on the command block? please answer.
Minecraft – How to testfor blocks not people
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – Testfor from player
- Minecraft – way to /testfor a specific potion
- Minecraft – How to use the /testfor command to detect block in an area
- Minecraft – Testfor comparator not turning on
- Minecraft – How to make a command block output a negative signal
- Minecraft – How to use testfor to testfor players nearby
- Minecraft – Testfor trigger isn’t working as expected in command blocks
- Minecraft – Repeat Command block not sending out a red stone signal
Best Answer
The command you want is /testforblock. The syntax of it is:
So to test for a stone block at X=10, Y=64, Z=10, the command would be: