ValueProvider 5.46.0
Float, int and height providers of the worldgen data (FloatProvider, IntProvider, HeightProvider), sampled with the same random draws and float32 arithmetic as vanilla.
Constants
BIASED_TO_BOTTOM
php
public const BIASED_TO_BOTTOM = 3CONSTANT
php
public const CONSTANT = 0TRAPEZOID
php
public const TRAPEZOID = 2UNIFORM
php
public const UNIFORM = 1VERY_BIASED_TO_BOTTOM
php
public const VERY_BIASED_TO_BOTTOM = 4Methods
anchor()
php
public static function anchor(mixed $json, int $minY, int $height) : intVerticalAnchor: {"absolute": y} | {"above_bottom": n} | {"below_top": n}
float()
php
public static function float(mixed $json) : selfFloatProvider: a number or {"type": "constant"|"uniform"|"trapezoid", ...}. Values are floats (float32).
height()
php
public static function height(mixed $json, int $minY, int $height) : selfHeightProvider: a vertical anchor (constant) or {"type": "constant"|"uniform", ...}, resolved for the world's height range.
int()
php
public static function int(mixed $json) : selfIntProvider: an integer or {"type": "constant"|"uniform"|"biased_to_bottom"|"very_biased_to_bottom", ...}.
sampleFloat()
php
public function sampleFloat(\pocketmine\world\generator\vanilla\random\LegacyRandom $random) : floatFloatProvider.sample()
sampleInt()
php
public function sampleInt(\pocketmine\world\generator\vanilla\random\LegacyRandom $random) : intIntProvider.sample() / HeightProvider.sample()
