Table of Contents

Namespace Shard.WorldGen.Rng

Classes

JavaHash

Java's String.hashCode(), replicated exactly: h = 31*h + c over the UTF-16 code units with 32-bit int overflow. .NET's string.GetHashCode() is randomized per-process and cannot be used — worldgen seeds derive from these hashes (via SeedBox), so they must match the reference generator bit-for-bit.

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.

SeedBox

Port of the v2 generator's SeedBox (builtin/HytaleGenerator rng/SeedBox). A seed is a string key; Child(string) derives sub-seeds by concatenation (so a node's "Seed" string appends to the parent key), and CreateSupplier() turns the key into a deterministic int stream via new JavaRandom(key.hashCode()). The concrete int seed a noise node gets is parentSeed.Child(seedKey).CreateSupplier()().