Skip to main content

Module utils

Module utils 

Source
Expand description

utils

Functionsยง

column_base_height ๐Ÿ”’
getBaseHeight(WORLD_SURFACE_WG)-compatible height scan. Uses preliminary_surface_level + 16 as an upper bound to avoid scanning empty upper atmosphere, and the cell-based iterator so 8-corner density evaluations are shared across Y values in each cell.
column_interpolated_density ๐Ÿ”’
Single-point getInterpolatedDensity. Exposed for GenerationContext.
find_solid_block_below_air ๐Ÿ”’
Finds the highest solid block below air in a single base-noise column.
interpolated_density ๐Ÿ”’
Evaluate terrain density at a single block position using cell-based interpolation matching vanillaโ€™s NoiseChunk: inner functions at 8 cell corners, trilinear interpolation per channel, then outer operations.
iterate_noise_column_capped ๐Ÿ”’
Same as iterate_noise_column_with_aquifer but only scans Y values up to max_y_inclusive. Used by base_height with an estimate from preliminary_surface_level + 16 to skip empty upper atmosphere โ€” reducing cell-corner density evaluations from O(height) to O(estimate_depth).
iterate_noise_column_with_aquifer ๐Ÿ”’
Matches vanillaโ€™s iterateNoiseColumn: iterates by Y cells, evaluating inner density functions at 8 cell corners, trilinearly interpolating each channel independently, then applying outer operations (squeeze, min, etc.) per-block via combine_interpolated.