mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Rename Chunk::getWritableSubChunk() -> Chunk::getSubChunkChecked()
this is not specific to 'writable', it's just an opt-in to checked bounds so that an EmptySubChunk will never be received.
This commit is contained in:
@ -111,10 +111,10 @@ class SkyLightUpdate extends LightUpdate{
|
||||
$lowestClearSubChunk = ($highestHeightMapPlusOne >> 4) + (($highestHeightMapPlusOne & 0xf) !== 0 ? 1 : 0);
|
||||
$chunkHeight = $chunk->getSubChunks()->count();
|
||||
for($y = 0; $y < $lowestClearSubChunk && $y < $chunkHeight; $y++){
|
||||
$chunk->getWritableSubChunk($y)->setBlockSkyLightArray(LightArray::fill(0));
|
||||
$chunk->getSubChunkChecked($y)->setBlockSkyLightArray(LightArray::fill(0));
|
||||
}
|
||||
for($y = $lowestClearSubChunk, $yMax = $chunkHeight; $y < $yMax; $y++){
|
||||
$chunk->getWritableSubChunk($y)->setBlockSkyLightArray(LightArray::fill(15));
|
||||
$chunk->getSubChunkChecked($y)->setBlockSkyLightArray(LightArray::fill(15));
|
||||
}
|
||||
|
||||
$lightSources = 0;
|
||||
|
Reference in New Issue
Block a user