BaseNbtWorldData
Implements WorldData
Constants
TAG_GENERATOR_NAME protected
protected const TAG_GENERATOR_NAME = "generatorName"TAG_GENERATOR_OPTIONS protected
protected const TAG_GENERATOR_OPTIONS = "generatorOptions"TAG_LEVEL_NAME protected
protected const TAG_LEVEL_NAME = "LevelName"TAG_RANDOM_SEED protected
protected const TAG_RANDOM_SEED = "RandomSeed"TAG_SPAWN_X protected
protected const TAG_SPAWN_X = "SpawnX"TAG_SPAWN_Y protected
protected const TAG_SPAWN_Y = "SpawnY"TAG_SPAWN_Z protected
protected const TAG_SPAWN_Z = "SpawnZ"TAG_TIME protected
protected const TAG_TIME = "Time"Properties
$compoundTag protected
protected \pocketmine\nbt\tag\CompoundTag $compoundTag$dataPath
public string $dataPathMethods
__construct()
public function __construct(string $dataPath)fix() protected
abstract protected function fix() : voidgetCompoundTag()
public function getCompoundTag() : \pocketmine\nbt\tag\CompoundTaggetGenerator()
public function getGenerator() : stringgetGeneratorOptions()
public function getGeneratorOptions() : stringgetName()
public function getName() : stringgetSeed()
public function getSeed() : intgetSpawn()
public function getSpawn() : \pocketmine\math\Vector3getTime()
public function getTime() : inthackyFixForGeneratorClasspathInLevelDat() protected
protected static function hackyFixForGeneratorClasspathInLevelDat(string $className) : ?stringHack to fix worlds broken previously by older versions of PocketMine-MP which incorrectly saved classpaths of generators into level.dat on imported (not generated) worlds.
This should only have affected leveldb worlds as far as I know, because PC format worlds include the generatorName tag by default. However, MCPE leveldb ones didn't, and so they would get filled in with something broken.
This bug took a long time to get found because previously the generator manager would just return the default generator silently on failure to identify the correct generator, which caused lots of unexpected bugs.
Only classnames which were written into the level.dat from "fixing" the level data are included here. These are hardcoded to avoid problems fixing broken worlds in the future if these classes get moved, renamed or removed.
load() protected
abstract protected function load() : \pocketmine\nbt\tag\CompoundTagsetName()
public function setName(string $value) : voidsetSpawn()
public function setSpawn(\pocketmine\math\Vector3 $pos) : voidsetTime()
public function setTime(int $value) : void