Skip to content

MersenneTwister 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\placement\MersenneTwister · source

MT19937 (32-bit Mersenne Twister), the random generator Bedrock Edition uses for structure placement. Only the standard init_genrand seeding is supported; outputs are unsigned 32-bit ints.

Methods ​

__construct() ​

php
public function __construct(int $seed)

nextBoundedInt() ​

php
public function nextBoundedInt(int $bound) : int

Bedrock's Random::nextInt(bound): genrand_int32() % bound.

nextUnsignedInt() ​

php
public function nextUnsignedInt() : int

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