summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-10-24 01:41:24 +0200
committerSamuel Barney <samjbarney@gmail.com>2013-10-24 01:41:24 +0200
commitf558f3c6d29931090378f75f7ea0ba84e81fead0 (patch)
tree94ad48ce91f5f4151b9c9bf4be0cc2f8239fe523 /source/Chunk.cpp
parentBats only spawn where there is no sunlight, and the light level is below 5 (diff)
downloadcuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar.gz
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar.bz2
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar.lz
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar.xz
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.tar.zst
cuberite-f558f3c6d29931090378f75f7ea0ba84e81fead0.zip
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r--source/Chunk.cpp96
1 files changed, 0 insertions, 96 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index 32a8b5c0f..2e81bf852 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -1356,102 +1356,6 @@ void cChunk::UnboundedQueueTickBlock(int a_RelX, int a_RelY, int a_RelZ)
-NIBBLETYPE cChunk::UnboundedRelGetSkyLight(int a_RelX, int a_RelY, int a_RelZ)
-{
-if ((a_RelY < 0) || (a_RelY > cChunkDef::Height))
- {
- LOGWARNING("UnboundedRelGetSkyLight(): requesting a block with a_RelY out of range: %d", a_RelY);
- return 127;
- }
-
- // Is it in this chunk?
- if ((a_RelX >= 0) && (a_RelX < cChunkDef::Width) && (a_RelZ >= 0) && (a_RelZ < cChunkDef::Width))
- {
- if (!IsValid())
- {
- return 127;
- }
- return GetSkyLight(a_RelX, a_RelY, a_RelZ);
- }
-
- // Not in this chunk, try walking the neighbors first:
- if ((a_RelX < 0) && (m_NeighborXM != NULL))
- {
- return m_NeighborXM->UnboundedRelGetSkyLight(a_RelX + cChunkDef::Width, a_RelY, a_RelZ);
- }
- if ((a_RelX >= cChunkDef::Width) && (m_NeighborXP != NULL))
- {
- return m_NeighborXP->UnboundedRelGetSkyLight(a_RelX - cChunkDef::Width, a_RelY, a_RelZ);
- }
- if ((a_RelZ < 0) && (m_NeighborZM != NULL))
- {
- return m_NeighborZM->UnboundedRelGetSkyLight(a_RelX, a_RelY, a_RelZ + cChunkDef::Width);
- }
- if ((a_RelZ >= cChunkDef::Width) && (m_NeighborZP != NULL))
- {
- return m_NeighborZP->UnboundedRelGetSkyLight(a_RelX, a_RelY, a_RelZ - cChunkDef::Width);
- }
-
- // Neighbors not available, use the chunkmap to locate the chunk:
- return m_ChunkMap->GetBlockSkyLight(
- m_PosX * cChunkDef::Width + a_RelX,
- ZERO_CHUNK_Y * cChunkDef::Height + a_RelY,
- m_PosZ * cChunkDef::Width + a_RelZ
- );
-}
-
-
-
-
-
-NIBBLETYPE cChunk::UnboundedRelGetBlockLight(int a_RelX, int a_RelY, int a_RelZ)
-{
-if ((a_RelY < 0) || (a_RelY > cChunkDef::Height))
- {
- LOGWARNING("UnboundedRelGetBlockLight(): requesting a block with a_RelY out of range: %d", a_RelY);
- return 127;
- }
-
- // Is it in this chunk?
- if ((a_RelX >= 0) && (a_RelX < cChunkDef::Width) && (a_RelZ >= 0) && (a_RelZ < cChunkDef::Width))
- {
- if (!IsValid())
- {
- return 127;
- }
- return GetBlockLight(a_RelX, a_RelY, a_RelZ);
- }
-
- // Not in this chunk, try walking the neighbors first:
- if ((a_RelX < 0) && (m_NeighborXM != NULL))
- {
- return m_NeighborXM->UnboundedRelGetBlockLight(a_RelX + cChunkDef::Width, a_RelY, a_RelZ);
- }
- if ((a_RelX >= cChunkDef::Width) && (m_NeighborXP != NULL))
- {
- return m_NeighborXP->UnboundedRelGetBlockLight(a_RelX - cChunkDef::Width, a_RelY, a_RelZ);
- }
- if ((a_RelZ < 0) && (m_NeighborZM != NULL))
- {
- return m_NeighborZM->UnboundedRelGetBlockLight(a_RelX, a_RelY, a_RelZ + cChunkDef::Width);
- }
- if ((a_RelZ >= cChunkDef::Width) && (m_NeighborZP != NULL))
- {
- return m_NeighborZP->UnboundedRelGetBlockLight(a_RelX, a_RelY, a_RelZ - cChunkDef::Width);
- }
-
- // Neighbors not available, use the chunkmap to locate the chunk:
- return m_ChunkMap->GetBlockBlockLight(
- m_PosX * cChunkDef::Width + a_RelX,
- ZERO_CHUNK_Y * cChunkDef::Height + a_RelY,
- m_PosZ * cChunkDef::Width + a_RelZ
- );
-}
-
-
-
-
-
int cChunk::GetHeight( int a_X, int a_Z )
{
ASSERT((a_X >= 0) && (a_X < Width) && (a_Z >= 0) && (a_Z < Width));