MCPcopy Create free account
hub / github.com/cuberite/cuberite / ReadChunks

Method ReadChunks

src/LightingThread.cpp:297–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295
296
297bool cLightingThread::ReadChunks(int a_ChunkX, int a_ChunkZ)
298{
299 cReader Reader;
300 Reader.m_BlockTypes = m_BlockTypes;
301 Reader.m_HeightMap = m_HeightMap;
302
303 for (int z = 0; z < 3; z++)
304 {
305 Reader.m_ReadingChunkZ = z;
306 for (int x = 0; x < 3; x++)
307 {
308 Reader.m_ReadingChunkX = x;
309 if (!m_World->GetChunkData(a_ChunkX + x - 1, a_ChunkZ + z - 1, Reader))
310 {
311 return false;
312 }
313 } // for z
314 } // for x
315
316 memset(m_BlockLight, 0, sizeof(m_BlockLight));
317 memset(m_SkyLight, 0, sizeof(m_SkyLight));
318 return true;
319}
320
321
322

Callers

nothing calls this directly

Calls 1

GetChunkDataMethod · 0.45

Tested by

no test coverage detected