summaryrefslogtreecommitdiffstats
path: root/source/Generating/ChunkDesc.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-05 21:56:45 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-05 21:56:45 +0200
commite88cdf8da714473624b221aca5a6feed2154a885 (patch)
treed5c49f766776e7e63d13dcca39fedbeda1db90db /source/Generating/ChunkDesc.h
parentFixed Biomal CompoGen to set heightmap correctly when underwater (diff)
downloadcuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar.gz
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar.bz2
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar.lz
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar.xz
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.tar.zst
cuberite-e88cdf8da714473624b221aca5a6feed2154a885.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/ChunkDesc.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/Generating/ChunkDesc.h b/source/Generating/ChunkDesc.h
index bc952fbe4..41b85a814 100644
--- a/source/Generating/ChunkDesc.h
+++ b/source/Generating/ChunkDesc.h
@@ -30,6 +30,9 @@ class cChunkDesc
public:
// tolua_end
+ /// Uncompressed block metas, 1 meta per byte
+ typedef NIBBLETYPE BlockNibbleBytes[cChunkDef::NumBlocks];
+
cChunkDesc(int a_ChunkX, int a_ChunkZ);
~cChunkDesc();
@@ -172,13 +175,14 @@ public:
void AddBlockEntity(cBlockEntity * a_BlockEntity);
// Accessors used by cChunkGenerator::Generator descendants:
- inline cChunkDef::BiomeMap & GetBiomeMap (void) { return m_BiomeMap; }
- inline cChunkDef::BlockTypes & GetBlockTypes (void) { return *((cChunkDef::BlockTypes *)m_BlockArea.GetBlockTypes()); }
+ inline cChunkDef::BiomeMap & GetBiomeMap (void) { return m_BiomeMap; }
+ inline cChunkDef::BlockTypes & GetBlockTypes (void) { return *((cChunkDef::BlockTypes *)m_BlockArea.GetBlockTypes()); }
// CANNOT, different compression!
- // inline cChunkDef::BlockNibbles & GetBlockMetas (void) { return *((cChunkDef::BlockNibbles *)m_BlockArea.GetBlockMetas()); }
- inline cChunkDef::HeightMap & GetHeightMap (void) { return m_HeightMap; }
- inline cEntityList & GetEntities (void) { return m_Entities; }
- inline cBlockEntityList & GetBlockEntities(void) { return m_BlockEntities; }
+ // inline cChunkDef::BlockNibbles & GetBlockMetas (void) { return *((cChunkDef::BlockNibbles *)m_BlockArea.GetBlockMetas()); }
+ inline BlockNibbleBytes & GetBlockMetasUncompressed(void) { return *((BlockNibbleBytes *)m_BlockArea.GetBlockMetas()); }
+ inline cChunkDef::HeightMap & GetHeightMap (void) { return m_HeightMap; }
+ inline cEntityList & GetEntities (void) { return m_Entities; }
+ inline cBlockEntityList & GetBlockEntities (void) { return m_BlockEntities; }
/// Compresses the metas from the BlockArea format (1 meta per byte) into regular format (2 metas per byte)
void CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas);