summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-30 10:39:15 +0200
committerMattes D <github@xoft.cz>2015-04-30 10:39:15 +0200
commit4bf3b874e396bd98ccb80b412d7095a4e12b1576 (patch)
treea8f5e48c198a99495bf0dc7390d84ed824c0ec12 /src/BlockArea.h
parentClay blocks are handled with the OreHandler (diff)
parentAPIDump: Added documentation for cBlockArea:GetNonAirCropRelCoords. (diff)
downloadcuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar.gz
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar.bz2
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar.lz
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar.xz
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.tar.zst
cuberite-4bf3b874e396bd98ccb80b412d7095a4e12b1576.zip
Diffstat (limited to 'src/BlockArea.h')
-rw-r--r--src/BlockArea.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h
index 348e960dd..ce417ceb4 100644
--- a/src/BlockArea.h
+++ b/src/BlockArea.h
@@ -54,6 +54,7 @@ public:
msLake,
msSpongePrint,
msDifference,
+ msSimpleCompare,
msMask,
} ;
@@ -156,6 +157,22 @@ public:
| A | sponge | A | Sponge is the NOP block
| * | B | B | Everything else overwrites anything
+ msDifference:
+ Used to determine the differences between two areas. Only the differring blocks are preserved:
+ | area block | |
+ | this | Src | result |
+ +------+-------+--------+
+ | A | A | air | Same blocks are replaced with air
+ | A | non-A | A | Differring blocks are kept from "this"
+
+ msSimpleCompare:
+ Used to determine the differences between two areas. Blocks that differ are replaced with stone, same blocks are replaced with air
+ | area block | |
+ | this | Src | result |
+ +------+-------+--------+
+ | A | A | air | Same blocks are replaced with air
+ | A | non-A | stone | Differring blocks are replaced with stone
+
msMask:
Combines two areas, the blocks that are the same are kept, differing ones are reset to air
| area block | |
@@ -288,6 +305,11 @@ public:
bool HasBlockSkyLights(void) const { return (m_BlockSkyLight != nullptr); }
// tolua_end
+
+ /** Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction.
+ If there are no non-ignored blocks within the area, or blocktypes are not present, the returned values are reverse-ranges (MinX <- m_RangeX, MaxX <- 0 etc.)
+ Exported to Lua in ManualBindings.cpp. */
+ void GetNonAirCropRelCoords(int & a_MinRelX, int & a_MinRelY, int & a_MinRelZ, int & a_MaxRelX, int & a_MaxRelY, int & a_MaxRelZ, BLOCKTYPE a_IgnoreBlockType = E_BLOCK_AIR);
// Clients can use these for faster access to all blocktypes. Be careful though!
/** Returns the internal pointer to the block types */