Skip to content

FeatureRegistry 5.46.0 ​

final class · pocketmine\world\generator\vanilla\feature\FeatureRegistry · source

Feature data of a world: placed and configured features (parsed lazily from the vanilla data), the biome feature lists, and the global feature order per decoration step (vanilla's FeatureSorter.buildFeaturesPerStep()), which gives every feature the index that seeds its random.

Constants ​

STEPS ​

php
public const STEPS = 11

Number of decoration steps (GenerationStep.Decoration).

Properties ​

$biomeIndex ​

php
public array $biomeIndex

$biomeNames ​

php
public array $biomeNames

Biome names in vanilla's possible-biomes order of the dimension's biome source (overworld: first appearance in the parameter list).

$biomeStepIndexes ​

php
public array $biomeStepIndexes

Indexes (into stepFeatures) of the features of each biome and step, sorted.

$blocks ​

php
public readonly \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks

$data ​

php
public readonly \pocketmine\world\generator\vanilla\WorldgenData $data

$stepFeatures ​

php
public array $stepFeatures

Features of each step in global order (FeatureSorter).

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\feature\block\JavaBlocks $blocks, ?\Closure $logger = null, ?array $possibleBiomes = null)

biomeHasFeature() ​

php
public function biomeHasFeature(int $biome, string $id) : bool

biomeInSet() ​

php
public function biomeInSet(int $biome, mixed $set) : bool

Biome holder set test (a biome id, a list of ids or a biome tag, which is not supported and never matches).

biomeInfoNoise() ​

php
public function biomeInfoNoise(float $x, float $z) : float

Biome.BIOME_INFO_NOISE.get(x, z): a float in vanilla 26.x.

biomeJson() ​

php
public function biomeJson(int $biome) : array

climate() ​

php
public function climate() : \pocketmine\world\generator\vanilla\feature\BiomeClimate

configuredRef() ​

php
public function configuredRef(mixed $json) : \pocketmine\world\generator\vanilla\feature\Feature

A configured feature field: a registry id or an inline {"type": ..., ...}.

multiNoiseBiomes() ​

php
public static function multiNoiseBiomes(\pocketmine\world\generator\vanilla\WorldgenData $data, string $dimension) : array

Biomes of a multi-noise biome source in its possible-biomes order: first appearance in the parameter list.

placed() ​

php
public function placed(string $id) : \pocketmine\world\generator\vanilla\feature\PlacedFeature

placedRef() ​

php
public function placedRef(mixed $json) : \pocketmine\world\generator\vanilla\feature\PlacedFeature

A placed feature field: a registry id or an inline {"feature": ..., "placement": [...]}.

stateProvider() ​

php
public function stateProvider(mixed $json) : \Closure

Block state provider field: a registry id (worldgen/block_state_provider), an inline provider {"type": ...} or a plain block state.

warn() ​

php
public function warn(string $key, string $message) : void

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