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:
Dylan K. Taylor
2020-10-31 22:46:33 +00:00
parent 5701e733cc
commit b270029161
4 changed files with 8 additions and 8 deletions

View File

@ -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;