mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
World: skip lighting updates on chunks which are not yet light populated
This commit is contained in:
parent
72ace3951e
commit
8762d44506
@ -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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user