From 05ab75b5ce975ea8350ed05da34203c85dd9890d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 27 Oct 2020 17:03:57 +0000 Subject: [PATCH] PopulationTask: do not calculate lighting for chunks we do this ondemand now, which means this is just wasting CPU for the vast majority of generated chunks. --- src/world/generator/PopulationTask.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/world/generator/PopulationTask.php b/src/world/generator/PopulationTask.php index f4f3df3ac..a35197084 100644 --- a/src/world/generator/PopulationTask.php +++ b/src/world/generator/PopulationTask.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace pocketmine\world\generator; -use pocketmine\block\BlockFactory; use pocketmine\scheduler\AsyncTask; use pocketmine\world\format\Chunk; use pocketmine\world\format\io\FastChunkSerializer; @@ -118,11 +117,6 @@ class PopulationTask extends AsyncTask{ $chunk = $manager->getChunk($chunk->getX(), $chunk->getZ()); $chunk->setPopulated(); - $blockFactory = BlockFactory::getInstance(); - $chunk->recalculateHeightMap($blockFactory->blocksDirectSkyLight); - $chunk->populateSkyLight($blockFactory->lightFilter); - $chunk->setLightPopulated(); - $this->chunk = FastChunkSerializer::serialize($chunk); foreach($chunks as $i => $c){