Commands/testforblock

Tests whether a certain block is in a specific location.

Arguments

 * Specifies the position of the block to test.  and   must be between -30,000,000 and 30,000,000 (inclusive, without the commas) and   must be between 0 and 255 (inclusive). May use tilde and caret notation to specify a position relative to the command's execution.


 * Specifies the block to test for. Must be a valid block id (for example, ).


 * Specifies the block data to test for. Must be between -1 and 15 (inclusive). If not specified, or if, matches any block data value.

Result
Fails if the arguments are not specified correctly, or if the block at the specified position does not match the specified block id or data.

On success, returns a success count of 1.

Examples

 * To test if the block at (0,64,0) is any type of wool:
 * To test if the block at (0,64,0) is orange wool:
 * To test if the block below is a jukebox:
 * To test if the block at (0,64,0) is orange wool:
 * To test if the block below is a jukebox:
 * To test if the block below is a jukebox:

History
Befehl/testforblock Commands/testforblock