GeneratorManager
Methods
__construct()
public function __construct()addAlias()
public function addAlias(string $name, string $alias) : voidAliases an already-registered generator name to another name. Useful if you want to map a generator name to an existing generator without having to replicate the parameters.
addGenerator()
public function addGenerator(string $class, string $name, \Closure $presetValidator, bool $overwrite = false, bool $fast = false, ?\pocketmine\world\dimension\Dimension $dimension = null) : voidgetDimensionGenerator() 5.46.0
public function getDimensionGenerator(string $generatorName, \pocketmine\world\dimension\Dimension $dimension) : ?stringReturns the name of the generator for the linked world of the given dimension of worlds made with $generatorName, or null if there is none (the dimension's default generator is used then).
getGenerator()
public function getGenerator(string $name) : ?\pocketmine\world\generator\GeneratorManagerEntryReturns the generator entry of a registered Generator matching the given name, or null if not found.
getGeneratorList()
public function getGeneratorList() : arrayReturns a list of names for registered generators.
getGeneratorName()
public function getGeneratorName(string $class) : stringReturns the registered name of the given Generator class.
setDimensionGenerator() 5.46.0
public function setDimensionGenerator(string $generatorName, \pocketmine\world\dimension\Dimension $dimension, string $dimensionGeneratorName) : voidSets the generator used to create the linked world of the given dimension (e.g. "world_nether") of worlds made with the generator $generatorName. Without one, the dimension's default generator is used (see Dimension::getDefaultGeneratorName()). The linked world gets the same generator options as the world.
