Skip to content

API reference / @jsprismarine/native-worldgen / NativeWorldgen / NativeAquifer

Class: NativeAquifer ​

Defined in: NativeWorldgen.ts:716

A chunk extent's noise aquifer in native memory, made by NativeWorldgen.createAquifer.

Properties ​

programs ​

readonly programs: readonly NativeDensityProgram[]

Defined in: NativeWorldgen.ts:720

The programs the aquifer runs, held so they live as long as it does.

Methods ​

destroy() ​

destroy(): void

Defined in: NativeWorldgen.ts:755

Frees the aquifer's native memory. Later calls throw. Its programs stay alive.

Returns ​

void


fill() ​

fill(densities, cell, out): boolean

Defined in: NativeWorldgen.ts:749

Decides the fluid of every block of one cell, x, then z, then y from the top down, the order the terrain cell walk visits them in.

Parameters ​

densities ​

Float64Array

The final density of each block.

cell ​

Int32Array

The first x, y and z, the last, inclusive, and the x and z strides of densities and out, whose y stride is 1.

out ​

Uint8Array

Receives each block's NativeFluid code.

Returns ​

boolean

False when a block lies outside the extent, which leaves out incomplete.

Throws ​

After destroy.