mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Untether LightUpdate and children from BlockFactory
This commit is contained in:
@@ -1162,16 +1162,17 @@ class World implements ChunkManager{
|
||||
}
|
||||
|
||||
public function updateAllLight(int $x, int $y, int $z) : void{
|
||||
$blockFactory = BlockFactory::getInstance();
|
||||
$this->timings->doBlockSkyLightUpdates->startTiming();
|
||||
if($this->skyLightUpdate === null){
|
||||
$this->skyLightUpdate = new SkyLightUpdate($this);
|
||||
$this->skyLightUpdate = new SkyLightUpdate($this, $blockFactory->lightFilter, $blockFactory->diffusesSkyLight);
|
||||
}
|
||||
$this->skyLightUpdate->recalculateNode($x, $y, $z);
|
||||
$this->timings->doBlockSkyLightUpdates->stopTiming();
|
||||
|
||||
$this->timings->doBlockLightUpdates->startTiming();
|
||||
if($this->blockLightUpdate === null){
|
||||
$this->blockLightUpdate = new BlockLightUpdate($this);
|
||||
$this->blockLightUpdate = new BlockLightUpdate($this, $blockFactory->lightFilter, $blockFactory->light);
|
||||
}
|
||||
$this->blockLightUpdate->recalculateNode($x, $y, $z);
|
||||
$this->timings->doBlockLightUpdates->stopTiming();
|
||||
|
Reference in New Issue
Block a user