The noise API provides the low-level noise primitives that power biome generation from MC 1.18 onward, as well as Beta-era terrain. There are three noise layers: single-octaveDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Cubitect/cubiomes/llms.txt
Use this file to discover all available pages before exploring further.
PerlinNoise, multi-octave OctaveNoise, and the paired DoublePerlinNoise. Most callers do not need to use these directly — they are initialized automatically inside BiomeNoise — but they are exposed for custom noise sampling and analysis.
Structs
PerlinNoise
A single octave of Perlin (or simplex) noise.
| Field | Type | Description |
|---|---|---|
d | uint8_t[] | 257-element permutation table. |
a, b, c | double | Origin offsets derived from the seed. |
amplitude | double | Per-octave amplitude scaling factor. |
lacunarity | double | Frequency multiplier between octaves. |
OctaveNoise
A stack of PerlinNoise octaves combined with exponential amplitude weighting.
| Field | Type | Description |
|---|---|---|
octcnt | int | Number of active octaves in the stack. |
octaves | PerlinNoise * | Array of octcnt initialized octaves. |
DoublePerlinNoise
Two parallel OctaveNoise stacks whose outputs are combined, matching Minecraft’s 1.18+ climate noise implementation.
| Field | Type | Description |
|---|---|---|
amplitude | double | Combined scaling factor. |
octA | OctaveNoise | First octave stack. |
octB | OctaveNoise | Second octave stack. |
Perlin noise functions
perlinInit
PerlinNoise instance using a Java Random seed. Advances the seed state by the number of calls required for initialization.
Pointer to the
PerlinNoise struct to initialize.Pointer to a 48-bit Java Random seed. The seed is advanced in place.
xPerlinInit
PerlinNoise instance using an Xoroshiro 128 RNG, as used in MC 1.18+.
Pointer to the
PerlinNoise struct to initialize.Pointer to an initialized
Xoroshiro state. Advanced in place.samplePerlin
(x, y, z). The yamp and ymin arguments control vertical amplitude clamping used internally by the terrain system; pass 0 for both to get a plain sample.
Initialized
PerlinNoise.X coordinate.
Y coordinate.
Z coordinate.
Vertical amplitude parameter. Pass
0 to ignore.Vertical minimum parameter. Pass
0 to ignore.sampleSimplex2D
(x, y) using the permutation table of noise.
Initialized
PerlinNoise.X coordinate.
Y coordinate.
Octave noise functions
octaveInit
OctaveNoise by calling perlinInit on len consecutive octaves. omin is the index of the lowest-frequency octave.
Pointer to the
OctaveNoise struct to initialize.Java Random seed, advanced in place.
Pre-allocated array of at least
len PerlinNoise elements.Minimum octave index (lowest frequency).
Number of octaves to initialize.
xOctaveInit
OctaveNoise using an Xoroshiro RNG with per-octave amplitude values from the amplitudes array (length len). Used for MC 1.18+ climate noise. Returns the number of active octaves on success.
Pointer to the
OctaveNoise struct to initialize.Xoroshiro state, advanced in place.
Pre-allocated array of at least
nmax PerlinNoise elements.Array of
len amplitude values, one per octave. Octaves with amplitude 0 are skipped.Minimum octave index.
Length of the
amplitudes array.Maximum number of octaves in the
octaves buffer.octaveInitBeta
OctaveNoise for Beta-era terrain generation with explicit lacunarity and persistence multipliers.
Pointer to the
OctaveNoise struct to initialize.Java Random seed, advanced in place.
Pre-allocated array of at least
octcnt elements.Number of octaves.
Starting lacunarity (frequency scale).
Lacunarity multiplier applied per octave.
Starting persistence (amplitude scale).
Persistence multiplier applied per octave.
sampleOctave
(x, y, z).
Initialized
OctaveNoise.X coordinate.
Y coordinate.
Z coordinate.
sampleOctaveAmp
Initialized
OctaveNoise.X coordinate.
Y coordinate.
Z coordinate.
Vertical amplitude clamp value.
Vertical minimum clamp value.
Default Y behavior flag.
sampleOctave2D
(x, z).
Initialized
OctaveNoise.X coordinate.
Z coordinate.
Double Perlin noise functions
doublePerlinInit
DoublePerlinNoise using Java Random, allocating two OctaveNoise stacks octA and octB from separate pre-allocated arrays.
Pointer to the
DoublePerlinNoise struct to initialize.Java Random seed, advanced in place.
Pre-allocated array for the first octave stack.
Pre-allocated array for the second octave stack.
Minimum octave index for both stacks.
Number of octaves in each stack.
xDoublePerlinInit
DoublePerlinNoise using Xoroshiro and per-octave amplitudes. Used for MC 1.18+ climate parameters. Returns the total number of active octaves.
Pointer to the
DoublePerlinNoise struct to initialize.Xoroshiro state, advanced in place.
Pre-allocated array for both stacks (must hold at least
2 * nmax elements).Array of
len amplitude values.Minimum octave index.
Length of the
amplitudes array.Maximum octaves per stack.
sampleDoublePerlin
(x, y, z), scaled by the noise amplitude.
Initialized
DoublePerlinNoise.X coordinate.
Y coordinate.
Z coordinate.