diff options
author | Mattes D <github@xoft.cz> | 2015-05-01 11:49:41 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-05-01 11:49:41 +0200 |
commit | 259132d17e53ec99c4eb00cd856260d14ea1234d (patch) | |
tree | bcb6ff9fc661b0fc1d8ad492f12c874227b4d949 /src/BlockArea.h | |
parent | Merge pull request #1923 from mc-server/ReadWholeFileFix (diff) | |
parent | Added cBlockArea:CountNonAirBlocks API function. (diff) | |
download | cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar.gz cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar.bz2 cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar.lz cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar.xz cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.tar.zst cuberite-259132d17e53ec99c4eb00cd856260d14ea1234d.zip |
Diffstat (limited to 'src/BlockArea.h')
-rw-r--r-- | src/BlockArea.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h index ce417ceb4..856df542f 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -303,7 +303,11 @@ public: bool HasBlockMetas (void) const { return (m_BlockMetas != nullptr); } bool HasBlockLights (void) const { return (m_BlockLight != nullptr); } bool HasBlockSkyLights(void) const { return (m_BlockSkyLight != nullptr); } - + + /** Returns the count of blocks that are not air. + Returns 0 if blocktypes not available. Block metas are ignored (if present, air with any meta is still considered air). */ + size_t CountNonAirBlocks(void) const; + // tolua_end /** Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction. |