[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/native-worldgen](https://jsprismarine.dev/api/@jsprismarine/native-worldgen/index.md) / [NativeWorldgen](https://jsprismarine.dev/api/@jsprismarine/native-worldgen/NativeWorldgen/index.md) / NativeAquifer

# Class: NativeAquifer

Defined in: [NativeWorldgen.ts:716](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/native-worldgen/src/NativeWorldgen.ts#L716)

A chunk extent's noise aquifer in native memory, made by [NativeWorldgen.createAquifer](https://jsprismarine.dev/api/@jsprismarine/native-worldgen/NativeWorldgen/classes/NativeWorldgen.md#createaquifer).

## Properties

### programs

> `readonly` **programs**: readonly [`NativeDensityProgram`](https://jsprismarine.dev/api/@jsprismarine/native-worldgen/NativeWorldgen/classes/NativeDensityProgram.md)[]

Defined in: [NativeWorldgen.ts:720](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/native-worldgen/src/NativeWorldgen.ts#L720)

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

## Methods

### destroy()

> **destroy**(): `void`

Defined in: [NativeWorldgen.ts:755](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/native-worldgen/src/NativeWorldgen.ts#L755)

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](https://github.com/JSPrismarine/JSPrismarine/blob/9db8dc5e83d04708d63ff9d73cae14f6c6b880f6/packages/native-worldgen/src/NativeWorldgen.ts#L749)

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](https://jsprismarine.dev/api/@jsprismarine/native-worldgen/NativeWorldgen/index.md#nativefluid) code.

#### Returns

`boolean`

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

#### Throws

After [destroy](#destroy).
