API reference / @jsprismarine/worldgen / NoiseBasedAquifer
Class: NoiseBasedAquifer
Defined in: chunk/Aquifer.ts:113
The noise-driven aquifer: a jittered 16 by 12 by 16 grid of cells, each with its own fluid surface, separated by stone barriers where two neighbors disagree.
This is the stage that puts lakes inside caves and keeps the ocean from draining into them. It reads six density functions and one positional random, and it is the only part of the density stage that draws random numbers.
Implements
Constructors
Constructor
new NoiseBasedAquifer(
context,samplers,positionalRandomFactory,volume,globalFluidPicker):NoiseBasedAquifer
Defined in: chunk/Aquifer.ts:140
Parameters
context
samplers
barrier
exclusion
floodedness
lava
spread
surfaceLevel
positionalRandomFactory
volume
globalFluidPicker
Returns
NoiseBasedAquifer
Methods
computeSubstance()
computeSubstance(
blockX,blockY,blockZ,density):string|undefined
Defined in: chunk/Aquifer.ts:204
Returns the block that fills a position, or undefined to leave the default block there.
Parameters
blockX
number
blockY
number
blockZ
number
density
number
The final density at the position; positive means solid.
Returns
string | undefined
Implementation of
shouldScheduleFluidUpdate()
shouldScheduleFluidUpdate():
boolean
Defined in: chunk/Aquifer.ts:190
Whether the last Aquifer.computeSubstance call wants a fluid tick scheduled.
Returns
boolean