summaryrefslogtreecommitdiffstats
path: root/source/Generating/ChunkDesc.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 18:55:03 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 18:55:03 +0100
commit1ed3b3aed2e538af2c3bffa41f54a30ac6535f12 (patch)
tree173949d9abcbd08d9c3535704419a372e52c7c8a /source/Generating/ChunkDesc.cpp
parentProbabDistrib: fixed definition string parsing with nonzero start (diff)
downloadcuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar.gz
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar.bz2
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar.lz
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar.xz
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.tar.zst
cuberite-1ed3b3aed2e538af2c3bffa41f54a30ac6535f12.zip
Diffstat (limited to 'source/Generating/ChunkDesc.cpp')
-rw-r--r--source/Generating/ChunkDesc.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/Generating/ChunkDesc.cpp b/source/Generating/ChunkDesc.cpp
index f19c0ae1e..00ccacc07 100644
--- a/source/Generating/ChunkDesc.cpp
+++ b/source/Generating/ChunkDesc.cpp
@@ -39,6 +39,16 @@ cChunkDesc::~cChunkDesc()
+void cChunkDesc::SetChunkCoords(int a_ChunkX, int a_ChunkZ)
+{
+ m_ChunkX = a_ChunkX;
+ m_ChunkZ = a_ChunkZ;
+}
+
+
+
+
+
void cChunkDesc::FillBlocks(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
const NIBBLETYPE CompressedMeta = a_BlockMeta | (a_BlockMeta << 4);
@@ -411,3 +421,19 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
+HEIGHTTYPE cChunkDesc::GetMaxHeight(void) const
+{
+ HEIGHTTYPE MaxHeight = m_HeightMap[0];
+ for (int i = 1; i < ARRAYCOUNT(m_HeightMap); i++)
+ {
+ if (m_HeightMap[i] > MaxHeight)
+ {
+ MaxHeight = m_HeightMap[i];
+ }
+ }
+ return MaxHeight;
+}
+
+
+
+