Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/testforblocks: Difference between revisions

From SAS Gaming Wiki
imported>LauraFii
History: split
 
SyncBot (talk | contribs)
Remove broken links to missing pages
Line 7: Line 7:
}}
}}


Tests whether the [[Minecraft:blocks]] in two regions match. Shows the number of matching blocks (the total number of blocks in <code>all</code> mode, or the number of source region non-air blocks in <code>masked</code> mode).
Tests whether the blocks in two regions match. Shows the number of matching blocks (the total number of blocks in <code>all</code> mode, or the number of source region non-air blocks in <code>masked</code> mode).


==Syntax==
==Syntax==
Line 68: Line 68:
{{Navbox commands}}
{{Navbox commands}}


[[Minecraft:de:Befehl/testforblocks]]
de:Befehl/testforblocks
[[Minecraft:es:Comandos/testforblocks]]
es:Comandos/testforblocks
[[Minecraft:ja:コマンド/testforblocks]]
ja:コマンド/testforblocks
[[Minecraft:pt:Comandos/testforblocks]]
pt:Comandos/testforblocks
[[Minecraft:ru:Команды консоли/testforblocks]]
ru:Команды консоли/testforblocks
[[Minecraft:zh:命令/testforblocks]]
zh:命令/testforblocks

Revision as of 15:45, 9 April 2026

Template:Distinguish Template:Exclusive Template:Outdated Template:Infobox command

Tests whether the blocks in two regions match. Shows the number of matching blocks (the total number of blocks in all mode, or the number of source region non-air blocks in masked mode).

Syntax

testforblocks <begin: x y z> <end: x y z> <destination: x y z> [masked|all]

Arguments

Template:Argument and Template:Argument

Specifies two opposing corners of the region to use as the pattern to test for (the "source region").
Template:Arg desc
Block position is the Minecraft:coordinates of the point at the lower northwest corner of a block. Because of this, the lesser coordinates of each axis falls right on the region boundary, but the greater coordinates are one block from the boundary, and the block volume of the source region is (xgreater - xlesser + 1) × (ygreater - ylesser + 1) × (zgreater - zlesser + 1). For example, 0 0 0 0 0 0 has a 1-block volume, and 0 0 0 1 1 1 and 1 1 1 0 0 0 both identify the same region with an 8-block volume.

Template:Argument

Specifies the lower northwestern corner (the corner with the most-negative values) of the region to be checked (the "destination region"). Source and destination regions may overlap.
Template:Arg desc

masked|all

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

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

External links

Navigation

Template:Navbox commands

de:Befehl/testforblocks es:Comandos/testforblocks ja:コマンド/testforblocks pt:Comandos/testforblocks ru:Команды консоли/testforblocks zh:命令/testforblocks