/detect is not a command on it’s own. it’s a subcommand of execute. replace the with the block you’re trying to detect and the with the respective blockstate (or a * for “doesn’t matter which blockstate”).
How to detect if a player is precisely above a command?
If you want to detect if a player is exactly on that coordinate (exactly means, so that the difference between the block coordinate and the player coordinates is even not 0.0001 or so), you can use this: (Replace the x y and z coordinates to whatever is above your command block.) However, it is a bit difficult for the player to get there.
Is there a way to check what block a player clicked on?
Right now it will replace any block with the one I want. I want to make it so it will only replace the block if it is stone, but there is no block in the procedure maker that checks what block the block is.
How do you kill a player standing on a specific block?
This selects all players, individually checks each player to see if the block beneath them is grass, then kills off the player if it is. Thanks for contributing an answer to Arqade!
How to execute if there is a certain block in Minecraft?
If you put a button on a command block and set it to: When the player hits the button on the command block (obviously they must be within range of the button to press it) it shall check if the block -1 under the @p is “yellow_glazed_terracotta”, and it will run say hi.
How to test a block in Minecraft Bedrock?
This feature is exclusive to Bedrock Edition. Tests whether a certain block is in a specific location. Specifies the coordinates of the block to test. It must be a three-dimensional coordinates composed of , and , each of which must be a floating-point number or tilde and caret notation.
How does the testfor command work in Minecraft?
Press the Enter key to run the command. Once the cheat has been entered, the testfor command will check for players nearby. You will see the message “Found xxx” appear in the lower left corner of the game window where xxx is the name of each player detected within 10 blocks of you.