Class EndDensitySource
java.lang.Object
org.cloudburstmc.server.level.generator.standard.misc.AbstractGenerationPass
org.cloudburstmc.server.level.generator.standard.generation.density.EndDensitySource
- All Implemented Interfaces:
DensitySource,GenerationPass
A
NoiseSource that provides noise similar to that of vanilla's end terrain.- Author:
- DaPorkchop_
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecutOff(double y, double noise)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()protected voidinit0(long levelSeed, long localSeed, StandardGenerator generator)Methods inherited from class org.cloudburstmc.server.level.generator.standard.misc.AbstractGenerationPass
init, setSeedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudburstmc.server.level.generator.standard.misc.GenerationPass
init
-
Field Details
-
ID
public static final org.cloudburstmc.api.util.Identifier ID
-
-
Constructor Details
-
EndDensitySource
public EndDensitySource()
-
-
Method Details
-
init0
- Overrides:
init0in classAbstractGenerationPass
-
get
Description copied from interface:DensitySourceGets the density at the given coordinates.- Specified by:
getin interfaceDensitySource- 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
public 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)Description copied from interface:DensitySourceGets the density in the given region.Values will be stored in the returned array in XZY order.
- Specified by:
getin interfaceDensitySource- 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
-
cutOff
protected double cutOff(double y, double noise) -
getId
public org.cloudburstmc.api.util.Identifier getId()- Specified by:
getIdin interfaceDensitySource- Specified by:
getIdin interfaceGenerationPass- Returns:
- the identifier of this generation pass
-