summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-29 15:14:22 +0200
committerMattes D <github@xoft.cz>2015-04-29 15:14:22 +0200
commitfc95501f68b28f2fc595eb574546500c2713ef96 (patch)
tree4201e7e773b152aea800f1024bc0ea4bca28eeda /src/BlockArea.h
parentFix explosions trying to write to unread blockarea (diff)
downloadcuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar.gz
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar.bz2
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar.lz
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar.xz
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.tar.zst
cuberite-fc95501f68b28f2fc595eb574546500c2713ef96.zip
Diffstat (limited to 'src/BlockArea.h')
-rw-r--r--src/BlockArea.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h
index 348e960dd..6b8b30443 100644
--- a/src/BlockArea.h
+++ b/src/BlockArea.h
@@ -288,6 +288,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 */