Class 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()().
public sealed class SeedBox
- Inheritance
-
SeedBox
- Inherited Members
Constructors
SeedBox(int)
public SeedBox(int key)
Parameters
keyint
SeedBox(string)
public SeedBox(string key)
Parameters
keystring
Methods
Child(string)
A child seed whose key is this.key + childKey (matches Java's string concat).
public SeedBox Child(string childKey)
Parameters
childKeystring
Returns
CreateSupplier()
A deterministic int stream seeded by the Java hash of the key. Each call advances the stream —
exactly like Java's createSupplier().get() returning rand.nextInt().
public Func<int> CreateSupplier()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.