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.
This commit is contained in:
Dylan K. Taylor 2020-10-27 17:03:57 +00:00
parent 31c2c3abb5
commit 05ab75b5ce

View File

@ -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){