diff options
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index a16d34f3b..34cb6a534 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -527,9 +527,11 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner) // MG TODO : check that "Level" really means Y - /*NIBBLETYPE SkyLight = 0; + /* + NIBBLETYPE SkyLight = 0; - NIBBLETYPE BlockLight = 0;*/ + NIBBLETYPE BlockLight = 0; + */ if (IsLightValid()) { @@ -2323,8 +2325,9 @@ BLOCKTYPE cChunk::GetBlock(int a_BlockIdx) const void cChunk::GetBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) { - a_BlockType = cChunkDef::GetBlock (m_BlockTypes, a_RelX, a_RelY, a_RelZ); - a_BlockMeta = cChunkDef::GetNibble(m_BlockMeta, a_RelX, a_RelY, a_RelZ); + int Idx = cChunkDef::MakeIndexNoCheck(a_RelX, a_RelY, a_RelZ); + a_BlockType = cChunkDef::GetBlock (m_BlockTypes, Idx); + a_BlockMeta = cChunkDef::GetNibble(m_BlockMeta, Idx); } |