mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Clean up generator preset handling
This commit is contained in:
@ -105,7 +105,7 @@ class FormatConverter{
|
||||
$this->logger->info("Found previous conversion attempt, deleting...");
|
||||
Filesystem::recursiveUnlink($convertedOutput);
|
||||
}
|
||||
$this->newProvider::generate($convertedOutput, $data->getName(), $data->getSeed(), GeneratorManager::getInstance()->getGenerator($data->getGenerator()), $data->getGeneratorOptions());
|
||||
$this->newProvider::generate($convertedOutput, $data->getName(), $data->getSeed(), GeneratorManager::getInstance()->getGenerator($data->getGenerator()), ["preset" => $data->getGeneratorOptions()]);
|
||||
|
||||
/**
|
||||
* @see WritableWorldProvider::__construct()
|
||||
|
@ -39,11 +39,7 @@ interface WorldData{
|
||||
*/
|
||||
public function getGenerator() : string;
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
* @phpstan-return array<string, mixed>
|
||||
*/
|
||||
public function getGeneratorOptions() : array;
|
||||
public function getGeneratorOptions() : string;
|
||||
|
||||
public function getSeed() : int;
|
||||
|
||||
|
@ -116,8 +116,8 @@ abstract class BaseNbtWorldData implements WorldData{
|
||||
return $this->compoundTag->getString("generatorName", "DEFAULT");
|
||||
}
|
||||
|
||||
public function getGeneratorOptions() : array{
|
||||
return ["preset" => $this->compoundTag->getString("generatorOptions", "")];
|
||||
public function getGeneratorOptions() : string{
|
||||
return $this->compoundTag->getString("generatorOptions", "");
|
||||
}
|
||||
|
||||
public function getSeed() : int{
|
||||
|
Reference in New Issue
Block a user