Commands/testforblocks

Tests whether the blocks in two regions match.

Arguments
and
 * Specifies two opposing corners of the region to use as the pattern to test for (the "source region").  and   must all 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 coordinates relative to the command's position. The number of blocks in the source region must not exceed 524,288.


 * Specifies the lower northwestern corner (the corner with the most-negative values) of the region to be checked (the "destination region").  and   must both 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 coordinates relative to the command's position. Source and destination regions may overlap.


 * Specifies how to match blocks. Must be one of:
 * — every block in the source and destination regions must match exactly.
 * — air blocks in the source region will match any block in the destination region.
 * If not specified, defaults to.

Result
Fails if the arguments are not specified correctly, or if the source and destination regions do not match.

On success, returns the number of matching blocks (the total number of blocks in  mode, or the number of source region non-air blocks in   mode).

History
Befehl/testforblocks 命令/testforblocks