summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-31 16:53:17 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-31 16:53:17 +0100
commit18fb814c3487231410b96cf237d4cc488e964f87 (patch)
tree7f846df7669175e4a5d5276c81ad3c16f96f29c4 /src/Chunk.cpp
parentrefactored chunk Queue to seperate class (diff)
parentremoved unneccisary cast (diff)
downloadcuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar.gz
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar.bz2
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar.lz
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar.xz
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.tar.zst
cuberite-18fb814c3487231410b96cf237d4cc488e964f87.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index a16d34f3b..b229a4aff 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -527,9 +527,10 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner)
// MG TODO : check that "Level" really means Y
- /*NIBBLETYPE SkyLight = 0;
-
- NIBBLETYPE BlockLight = 0;*/
+ /*
+ NIBBLETYPE SkyLight = 0;
+ NIBBLETYPE BlockLight = 0;
+ */
if (IsLightValid())
{
@@ -2323,8 +2324,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);
}
@@ -2896,11 +2898,3 @@ NIBBLETYPE cChunk::GetTimeAlteredLight(NIBBLETYPE a_Skylight) const
-
-#if !C_CHUNK_USE_INLINE
-# include "cChunk.inl.h"
-#endif
-
-
-
-