$generatorSettings */ public function __construct(World $world, string $generatorClass, array $generatorSettings = []){ $this->generatorClass = $generatorClass; $this->settings = serialize($generatorSettings); $this->seed = $world->getSeed(); $this->worldId = $world->getId(); $this->worldHeight = $world->getWorldHeight(); } public function onRun() : void{ BlockFactory::init(); Biome::init(); $manager = new GeneratorChunkManager($this->worldHeight); $this->worker->saveToThreadStore("generation.world{$this->worldId}.manager", $manager); /** * @var Generator $generator * @see Generator::__construct() */ $generator = new $this->generatorClass($manager, $this->seed, unserialize($this->settings)); $this->worker->saveToThreadStore("generation.world{$this->worldId}.generator", $generator); } }