LightPopulationTask: do not copy existing light arrays

this task wipes out the light arrays and recalculates them from scratch, so it's pointless to copy any preexisting light arrays anyway.
This commit is contained in:
Dylan K. Taylor 2021-10-01 22:34:11 +01:00
parent 32f8b8163e
commit e6f6a036ef
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -51,7 +51,7 @@ class LightPopulationTask extends AsyncTask{
* @phpstan-param \Closure(array<int, LightArray> $blockLight, array<int, LightArray> $skyLight, array<int, int> $heightMap) : void $onCompletion
*/
public function __construct(Chunk $chunk, \Closure $onCompletion){
$this->chunk = FastChunkSerializer::serialize($chunk);
$this->chunk = FastChunkSerializer::serializeWithoutLight($chunk);
$this->storeLocal(self::TLS_KEY_COMPLETION_CALLBACK, $onCompletion);
}