Skip to content

ValueProvider 5.46.0 ​

final class · pocketmine\world\generator\vanilla\carver\ValueProvider · source

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 = 3

CONSTANT ​

php
public const CONSTANT = 0

TRAPEZOID ​

php
public const TRAPEZOID = 2

UNIFORM ​

php
public const UNIFORM = 1

VERY_BIASED_TO_BOTTOM ​

php
public const VERY_BIASED_TO_BOTTOM = 4

Methods ​

anchor() ​

php
public static function anchor(mixed $json, int $minY, int $height) : int

VerticalAnchor: {"absolute": y} | {"above_bottom": n} | {"below_top": n}

float() ​

php
public static function float(mixed $json) : self

FloatProvider: a number or {"type": "constant"|"uniform"|"trapezoid", ...}. Values are floats (float32).

height() ​

php
public static function height(mixed $json, int $minY, int $height) : self

HeightProvider: a vertical anchor (constant) or {"type": "constant"|"uniform", ...}, resolved for the world's height range.

int() ​

php
public static function int(mixed $json) : self

IntProvider: 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) : float

FloatProvider.sample()

sampleInt() ​

php
public function sampleInt(\pocketmine\world\generator\vanilla\random\LegacyRandom $random) : int

IntProvider.sample() / HeightProvider.sample()

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