Skip to content

WorldgenData 5.46.0 ​

final class · pocketmine\world\generator\vanilla\WorldgenData · source

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() ​

php
public function __construct(string $root)

array() ​

php
public static function array(array $obj, string $key) : array

biome() ​

php
public function biome(string $id) : array

biomeParameters() ​

php
public function biomeParameters(string $dimension) : array

biomeTree() ​

php
public function biomeTree() : ?array

Search 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() ​

php
public function blockTag(string $id, int $depth = 0) : ?array

Block ids of a block tag ("minecraft:uncarvable"), nested tags resolved, or null if the cache does not have it.

carver() ​

php
public function carver(string $id) : array

densityFunction() ​

php
public function densityFunction(string $id) : mixed

float() ​

php
public static function float(array $obj, string $key, ?float $default = null) : float

floatList() ​

php
public static function floatList(array $obj, string $key) : array

getRoot() ​

php
public function getRoot() : string

hasCarvers() ​

php
public function hasCarvers() : bool

Whether the cache has the carver definitions (worldgen/carver, 26.3+; older caches lack them).

int() ​

php
public static function int(array $obj, string $key, ?int $default = null) : int

materialCondition() ​

php
public function materialCondition(string $id) : mixed

materialRule() ​

php
public function materialRule(string $id) : mixed

noise() ​

php
public function noise(string $id) : array

noiseSettings() ​

php
public function noiseSettings(string $id) : array

read() ​

php
public function read(string $relativePath) : mixed

readObject() ​

php
public function readObject(string $relativePath) : array

shared() ​

php
public static function shared(string $root) : self

Returns 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() ​

php
public static function string(array $obj, string $key, ?string $default = null) : string

stripNamespace() ​

php
public static function stripNamespace(string $id) : string

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.