WorldgenData 5.46.0
Read-only access to the vanilla worldgen data files (Java Edition data, © Mojang) in a local cache directory. The data is NOT shipped with PocketMine-MP; see VanillaDataFetcher for how the cache is filled.
Layout (as written by the Java Edition data generator, see VanillaDataFetcher::EXTRACTED_PATHS): <root>/data/minecraft/worldgen/{noise,density_function,noise_settings,material_rule,material_condition,biome,...} <root>/reports/biome_parameters/minecraft/<dimension>.json (multi-noise biome parameter points) <root>/multi_noise_biome_tree.json (overworld biome search tree built from the parameters) <root>/version.json (version stamp, see VanillaDataFetcher)
Methods
__construct()
public function __construct(string $root)array()
public static function array(array $obj, string $key) : arraybiome()
public function biome(string $id) : arraybiomeParameters()
public function biomeParameters(string $dimension) : arraybiomeTree()
public function biomeTree() : ?arraySearch trees of the multi-noise biome sources by dimension (written by VanillaDataFetcher, also read by the native terrain core), or null if the cache has none.
blockTag()
public function blockTag(string $id, int $depth = 0) : ?arrayBlock ids of a block tag ("minecraft:uncarvable"), nested tags resolved, or null if the cache does not have it.
carver()
public function carver(string $id) : arraydensityFunction()
public function densityFunction(string $id) : mixedfloat()
public static function float(array $obj, string $key, ?float $default = null) : floatfloatList()
public static function floatList(array $obj, string $key) : arraygetRoot()
public function getRoot() : stringhasCarvers()
public function hasCarvers() : boolWhether the cache has the carver definitions (worldgen/carver, 26.3+; older caches lack them).
int()
public static function int(array $obj, string $key, ?int $default = null) : intmaterialCondition()
public function materialCondition(string $id) : mixedmaterialRule()
public function materialRule(string $id) : mixednoise()
public function noise(string $id) : arraynoiseSettings()
public function noiseSettings(string $id) : arrayread()
public function read(string $relativePath) : mixedreadObject()
public function readObject(string $relativePath) : arrayshared()
public static function shared(string $root) : selfReturns a shared instance for the given directory: the generators of a world's dimensions (and of several worlds) in the same thread then parse each file only once.
string()
public static function string(array $obj, string $key, ?string $default = null) : stringstripNamespace()
public static function stripNamespace(string $id) : string