58 $manager->setChunk(0, 0, $chunk);
60 $blockFactory = RuntimeBlockStateRegistry::getInstance();
64 ] as $name => $update){
65 $update->recalculateChunk(0, 0);
69 $chunk->setLightPopulated();
71 $this->resultHeightMap = igbinary_serialize($chunk->getHeightMapArray());
73 $blockLightArrays = [];
74 foreach($chunk->getSubChunks() as $y => $subChunk){
75 $skyLightArrays[$y] = $subChunk->getBlockSkyLightArray();
76 $blockLightArrays[$y] = $subChunk->getBlockLightArray();
78 $this->resultSkyLightArrays = igbinary_serialize($skyLightArrays);
79 $this->resultBlockLightArrays = igbinary_serialize($blockLightArrays);
84 $heightMapArray = igbinary_unserialize($this->resultHeightMap);
87 $skyLightArrays = igbinary_unserialize($this->resultSkyLightArrays);
89 $blockLightArrays = igbinary_unserialize($this->resultBlockLightArrays);
95 $callback = $this->fetchLocal(self::TLS_KEY_COMPLETION_CALLBACK);
96 $callback($blockLightArrays, $skyLightArrays, $heightMapArray);