Editing
MinecraftCommands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== testforblocks === {{/infobox |testforblocks |op |1.8|14w07a }} Tests whether the blocks in two regions match. ;Syntax : <code>testforblocks <span style="background-color:#FDD"><''x1''> <''y1''> <''z1''></span> <span style="background-color:#FFD"><''x2''> <''y2''> <''z2''></span> <span style="background-color:#DDF"><''x''> <''y''> <''z''></span> [''mode'']</code> : ''Color added to make reading easier.'' ;Arguments : <span style="background-color:#FDD">''x1 y1 z1''</span> and <span style="background-color:#FFD">''x2 y2 z2''</span> :: Specifies two opposing corners of the region to use as the pattern to test for (the "source region"). ''x1'', ''z1'', ''x2'', and ''z2'' must all be between [[World boundary|-30,000,000 and 30,000,000]] (inclusive, without the commas), and ''y1'' and ''y2'' must be between 0 and 255 (inclusive). May use [[#Tilde notation|tilde notation]] to specify coordinates relative to the command's position. The number of blocks in the source region must not exceed 524,288. : <span style="background-color:#DDF">''x y z''</span> :: Specifies the lower northwestern corner (the corner with the most-negative values) of the region to be checked (the "destination region"). ''x'' and ''z'' must both be between [[World boundary|-30,000,000 and 30,000,000]] (inclusive, without the commas), and ''y'' must be between 0 and 255 (inclusive). May use [[#Tilde notation|tilde notation]] to specify coordinates relative to the command's position. Source and destination regions may overlap. : ''mode'' (optional) :: Specifies how to match blocks. Must be one of: ::* <code>all</code> β every block in the source and destination regions must match exactly. ::* <code>masked</code> β [[air]] blocks in the source region will match any block in the destination region. :: If not specified, defaults to <code>all</code>. ;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 ''all'' mode, or the number of source region non-air blocks in ''masked'' mode). <!-- please retain double newline above for section differentiation -->
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information