Class JavaRandom
A bit-for-bit port of java.util.Random — the 48-bit LCG that Hytale v2's FastRandom and its
noise-field seeding are built on. Terrain parity with the reference generator depends on this matching Java
exactly (our xoshiro RNG does NOT — it must not be used on the worldgen seed path). Not thread-safe, mirroring
the per-instance use in the Java generator.
public sealed class JavaRandom
- Inheritance
-
JavaRandom
- Inherited Members
Constructors
JavaRandom(long)
Seeds via Java's initialScramble: (seed ^ multiplier) & mask.
public JavaRandom(long seed)
Parameters
seedlong
Methods
NextDouble()
(((long)next(26) << 27) + next(27)) * 2^-53 — Java's exact nextDouble.
public double NextDouble()
Returns
NextInt()
public int NextInt()
Returns
NextLong()
public long NextLong()