Skip to content

LegacyRandom 5.46.0 ​

final class · pocketmine\world\generator\vanilla\random\LegacyRandom · source

Implements RandomSource

The 48-bit linear congruential generator of java.util.Random, used by the legacy (pre-1.18 seeded) noises.

Methods ​

__construct() ​

php
public function __construct(int $seed)

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

nextBoolean() ​

php
public function nextBoolean() : bool

nextBoundedInt() ​

php
public function nextBoundedInt(int $bound) : int

nextDouble() ​

php
public function nextDouble() : float

nextFloat() ​

php
public function nextFloat() : float

nextInt() ​

php
public function nextInt() : int

nextLong() ​

php
public function nextLong() : int

setSeed() ​

php
public function setSeed(int $seed) : void

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