World: skip lighting updates on chunks which are not yet light populated

This commit is contained in:
Dylan K. Taylor 2020-11-04 17:50:16 +00:00
parent 72ace3951e
commit 8762d44506

View File

@ -1215,6 +1215,11 @@ class World implements ChunkManager{
}
public function updateAllLight(int $x, int $y, int $z) : void{
if(($chunk = $this->getChunk($x >> 4, $z >> 4)) === null || $chunk->isLightPopulated() !== true){
$this->logger->debug("Skipped runtime light update of x=$x,y=$y,z=$z because the target area has not received base light calculation");
return;
}
$blockFactory = BlockFactory::getInstance();
$this->timings->doBlockSkyLightUpdates->startTiming();
if($this->skyLightUpdate === null){