Interface DensitySource
- All Superinterfaces:
GenerationPass
- All Known Implementing Classes:
EndDensitySource,NetherDensitySource,VanillaDensitySource
Provides density values used for the initial world surface generation.
- Author:
- DaPorkchop_
- See Also:
NoiseSource
-
Method Summary
Modifier and TypeMethodDescriptiondefault double[]get(double[] arr, int startIndex, @NonNull BiomeMap biomes, int x, int y, int z, int sizeX, int sizeY, int sizeZ, int stepX, int stepY, int stepZ)Gets the density in the given region.doubleGets the density at the given coordinates.org.cloudburstmc.api.util.IdentifiergetId()Methods inherited from interface org.cloudburstmc.server.level.generator.standard.misc.GenerationPass
init
-
Method Details
-
get
Gets the density at the given coordinates.- Parameters:
biomes- aBiomeMapcontaining the biomes to be used in the worldx- the X coordinatey- the Y coordinatez- the Z coordinate- Returns:
- the density at the given coordinates
-
get
default double[] get(double[] arr, int startIndex, @NonNull @NonNull BiomeMap biomes, int x, int y, int z, int sizeX, int sizeY, int sizeZ, int stepX, int stepY, int stepZ)Gets the density in the given region.Values will be stored in the returned array in XZY order.
- Parameters:
arr- adouble[]to store the density values in. if too small ornull, a new one will be createdstartIndex- the index to begin storing values into the array atbiomes- aBiomeMapcontaining the biomes to be used in the worldx- the X coordinatey- the Y coordinatez- the Z coordinatesizeX- the number of samples to take along the X axissizeY- the number of samples to take along the Y axissizeZ- the number of samples to take along the Z axisstepX- the spacing between samples along the X axisstepY- the spacing between samples along the Y axisstepZ- the spacing between samples along the Z axis- Returns:
- the density at the given coordinates
-
getId
org.cloudburstmc.api.util.Identifier getId()- Specified by:
getIdin interfaceGenerationPass- Returns:
- the identifier of this generation pass
-