summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-16 16:48:40 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-16 16:48:40 +0100
commit38b219de625c6c334b1b900c911886f5469a1720 (patch)
treeb22775470536715a12e698f9aba4cb0f2682d0cb /source/cChunkMap.cpp
parentActually commented out the Anvil terrain inversion code (diff)
downloadcuberite-38b219de625c6c334b1b900c911886f5469a1720.tar
cuberite-38b219de625c6c334b1b900c911886f5469a1720.tar.gz
cuberite-38b219de625c6c334b1b900c911886f5469a1720.tar.bz2
cuberite-38b219de625c6c334b1b900c911886f5469a1720.tar.lz
cuberite-38b219de625c6c334b1b900c911886f5469a1720.tar.xz
cuberite-38b219de625c6c334b1b900c911886f5469a1720.tar.zst
cuberite-38b219de625c6c334b1b900c911886f5469a1720.zip
Diffstat (limited to 'source/cChunkMap.cpp')
-rw-r--r--source/cChunkMap.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index 97f6a659f..c36f2610f 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -557,7 +557,25 @@ BLOCKTYPE cChunkMap::GetBlockMeta(int a_X, int a_Y, int a_Z)
-void cChunkMap::SetBlockMeta(int a_X, int a_Y, int a_Z, BLOCKTYPE a_BlockMeta)
+BLOCKTYPE cChunkMap::GetBlockSkyLight(int a_X, int a_Y, int a_Z)
+{
+ int ChunkX, ChunkZ;
+ cChunkDef::AbsoluteToRelative( a_X, a_Y, a_Z, ChunkX, ChunkZ );
+
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunk( ChunkX, ZERO_CHUNK_Y, ChunkZ );
+ if ((Chunk != NULL) && Chunk->IsValid() )
+ {
+ return cChunk::GetNibble( Chunk->pGetSkyLight(), a_X, a_Y, a_Z );
+ }
+ return 0;
+}
+
+
+
+
+
+void cChunkMap::SetBlockMeta(int a_X, int a_Y, int a_Z, char a_BlockMeta)
{
int ChunkX, ChunkZ;
cChunkDef::AbsoluteToRelative( a_X, a_Y, a_Z, ChunkX, ChunkZ );