Skip to content

API reference Obsidian.API.World.Generator.RandomSources

XoroshiroRandomSource class

xoroshiro128++ random source used by modern (1.18+) world generation.

public sealed class XoroshiroRandomSource : IRandomSource

In Obsidian.API.

Constructors

XoroshiroRandomSource(long)

public XoroshiroRandomSource(long seed);

Creates a source from a 64-bit seed, expanded with RandomSupport.UpgradeSeedTo128Bit.

XoroshiroRandomSource(long, long)

public XoroshiroRandomSource(long seedLo, long seedHi);

Creates a source from a raw 128-bit state (no mixing).

public XoroshiroRandomSource(Seed128Bit seed);

Methods

public void ConsumeCount(int count);public IRandomSource Fork();public IPositionalRandomFactory ForkPositional();public bool NextBoolean();public double NextDouble();public float NextFloat();public double NextGaussian();public int NextInt();public int NextInt(int bound);public int NextInt(int origin, int bound);public int NextIntBetweenInclusive(int min, int max);public long NextLong();public void SetSeed(long seed);public double Triangle(double mode, double deviation);public float Triangle(float mode, float deviation);

On this page