Skip to content

API reference / @jsprismarine/worldgen / LegacyPositionalRandomFactory

Class: LegacyPositionalRandomFactory ​

Defined in: random/LegacyRandomSource.ts:154

The positional factory legacy-seeded worlds use.

Implements ​

Constructors ​

Constructor ​

new LegacyPositionalRandomFactory(seed): LegacyPositionalRandomFactory

Defined in: random/LegacyRandomSource.ts:155

Parameters ​

seed ​

bigint

Returns ​

LegacyPositionalRandomFactory

Methods ​

at() ​

at(x, y, z): RandomSource

Defined in: random/LegacyRandomSource.ts:158

Returns the stream for one block position.

Parameters ​

x ​

number

y ​

number

z ​

number

Returns ​

RandomSource

Implementation of ​

PositionalRandomFactory.at


fromHashOf() ​

fromHashOf(name): RandomSource

Defined in: random/LegacyRandomSource.ts:163

Returns the stream for a registry name, hashed with MD5 for Xoroshiro and String.hashCode for the legacy source.

Parameters ​

name ​

string

Returns ​

RandomSource

Implementation of ​

PositionalRandomFactory.fromHashOf


fromSeed() ​

fromSeed(seed): RandomSource

Defined in: random/LegacyRandomSource.ts:168

Returns the stream for a raw 64-bit seed.

Parameters ​

seed ​

bigint

Returns ​

RandomSource

Implementation of ​

PositionalRandomFactory.fromSeed