NumberProvider 5.46.0
A vanilla number provider (constant, uniform, binomial...), with Java's float arithmetic.
Methods
constant()
php
public static function constant(float $value) : selfgetFloat()
php
public function getFloat(\pocketmine\loot\LootContext $context) : floatgetInt()
php
public function getInt(\pocketmine\loot\LootContext $context) : intnextInt()
php
public static function nextInt(\pocketmine\loot\LootContext $context, int $min, int $max) : intMth.nextInt(): a random int in [min, max], without using the random if min >= max.
parse()
php
public static function parse(mixed $json, \pocketmine\loot\LootCompiler $compiler) : selfrandomBetween()
php
public static function randomBetween(\pocketmine\loot\LootContext $context, float $min, float $max) : floatMth.randomBetween() for floats.
round()
php
public static function round(float $value) : intJava's Math.round(float).
