Skip to content

RandomSource 5.46.0 ​

interface · pocketmine\world\generator\vanilla\random\RandomSource · source

Random source with the semantics of the vanilla (1.18+) world generator random sources.

Methods ​

consume() ​

php
public function consume(int $count) : void

fork() ​

php
public function fork() : \pocketmine\world\generator\vanilla\random\RandomSource

forkPositional() ​

php
public function forkPositional() : \pocketmine\world\generator\vanilla\random\PositionalRandomFactory

nextBoundedInt() ​

php
public function nextBoundedInt(int $bound) : int

Uniform int in [0, bound).

nextDouble() ​

php
public function nextDouble() : float

nextFloat() ​

php
public function nextFloat() : float

nextInt() ​

php
public function nextInt() : int

Uniform 32-bit signed int.

nextLong() ​

php
public function nextLong() : int

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