mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
World: skip lighting updates on chunks which are not yet light populated
This commit is contained in:
@@ -1215,6 +1215,11 @@ class World implements ChunkManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function updateAllLight(int $x, int $y, int $z) : void{
|
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();
|
$blockFactory = BlockFactory::getInstance();
|
||||||
$this->timings->doBlockSkyLightUpdates->startTiming();
|
$this->timings->doBlockSkyLightUpdates->startTiming();
|
||||||
if($this->skyLightUpdate === null){
|
if($this->skyLightUpdate === null){
|
||||||
|
Reference in New Issue
Block a user