Interface Aquifer
- All Known Implementing Classes:
Aquifer.NoiseBasedAquifer
public interface Aquifer
Aquifers are responsible for non-sea level fluids found in terrain generation, but also managing that different aquifers don't intersect with each other in ways that would create undesirable fluid placement.
The aquifer interface itself is a modifier on a per-block basis. It computes a block state to be placed for each position in the world.
Aquifers work by first partitioning a single chunk into a low resolution grid. They then generate, via various noise layers, an
at each grid point.
At each point, the grid cell containing that point is calculated, and then of the eight grid corners, the three closest aquifers are found, by square euclidean distance.
Borders between aquifers are created by comparing nearby aquifers to see if the given point is near-equidistant from them, indicating a border if so, or fluid/air depending on the aquifer height if not.invalid reference
NoiseBasedAquifer.AquiferStatus
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static final class
static class
-
Method Summary
Modifier and TypeMethodDescriptioncomputeSubstance
(DensityFunction.FunctionContext pContext, double pSubstance) static Aquifer
create
(NoiseChunk pChunk, ChunkPos pChunkPos, NoiseRouter pNoiseRouter, PositionalRandomFactory pPositionalRandomFactory, int pMinY, int pHeight, Aquifer.FluidPicker pGlobalFluidPicker) Creates a standard noise based aquifer.static Aquifer
createDisabled
(Aquifer.FluidPicker pDefaultFluid) Creates a disabled, or no-op aquifer.boolean
-
Method Details
-
create
static Aquifer create(NoiseChunk pChunk, ChunkPos pChunkPos, NoiseRouter pNoiseRouter, PositionalRandomFactory pPositionalRandomFactory, int pMinY, int pHeight, Aquifer.FluidPicker pGlobalFluidPicker) Creates a standard noise based aquifer. This aquifer will place liquid (both water and lava), air, and stone as described above. -
createDisabled
Creates a disabled, or no-op aquifer. This will fill any open areas below sea level with the default fluid. -
computeSubstance
-
shouldScheduleFluidUpdate
boolean shouldScheduleFluidUpdate()
-