Skip to main content

Module noise_chunk

Module noise_chunk 

Source
Expand description

NoiseChunk: cell-based terrain density evaluation with trilinear interpolation.

Matches vanilla’s NoiseChunk + NoiseBasedChunkGenerator.doFill() flow.

Vanilla wraps density functions with Interpolated markers. Only the inner functions (arguments to Interpolated) are evaluated at cell corners; the outer operations (squeeze, min, etc.) are applied per-block after trilinear interpolation. Markers with identical evaluations share a channel.

Cell dimensions depend on the dimension’s noise settings.

Structs§

NoiseChunk
Stores density values at cell corners for a single chunk and provides trilinear interpolation between corners for block-level resolution.

Constants§

INTERPOLATION_LANES 🔒
MAX_CELL_HEIGHT 🔒
The largest Vanilla noise cell height (overworld’s is 8).
MAX_INTERP 🔒
Maximum number of interpolation channels supported.
MAX_SLICE_LEN 🔒
Maximum slice length (z_corners * corners_y) across all dimensions. Overworld: (16/4+1) * (384/8+1) = 5 * 49 = 245. Rounded up for headroom.