Skip to content

API reference / @jsprismarine/worldgen / Xoroshiro128PlusPlus

Class: Xoroshiro128PlusPlus ​

Defined in: random/XoroshiroRandomSource.ts:32

The Xoroshiro128++ generator, the algorithm Java Edition selects when a noise settings file says legacy_random_source: false. All overworld terrain since 1.18 comes from it.

This is the reference implementation over BigInt, exact and slow. XoroshiroRandomSource runs the same recurrence over 32-bit lanes for speed, and the random test suite holds the two to bit equality over millions of draws.

Constructors ​

Constructor ​

new Xoroshiro128PlusPlus(seedLo, seedHi): Xoroshiro128PlusPlus

Defined in: random/XoroshiroRandomSource.ts:36

Parameters ​

seedLo ​

bigint

seedHi ​

bigint

Returns ​

Xoroshiro128PlusPlus

Methods ​

nextLong() ​

nextLong(): bigint

Defined in: random/XoroshiroRandomSource.ts:48

Advances the state and returns the next 64-bit output.

Returns ​

bigint