All Superinterfaces:
GenerationPass
All Known Implementing Classes:
EndDensitySource, NetherDensitySource, VanillaDensitySource

public interface DensitySource extends GenerationPass
Provides density values used for the initial world surface generation.
Author:
DaPorkchop_
See Also:
NoiseSource
  • Method Summary

    Modifier and Type
    Method
    Description
    default 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.
    double
    get​(@NonNull BiomeMap biomes, int x, int y, int z)
    Gets the density at the given coordinates.
    org.cloudburstmc.api.util.Identifier
     

    Methods inherited from interface org.cloudburstmc.server.level.generator.standard.misc.GenerationPass

    init
  • Method Details

    • get

      double get(@NonNull @NonNull BiomeMap biomes, int x, int y, int z)
      Gets the density at the given coordinates.
      Parameters:
      biomes - a BiomeMap containing the biomes to be used in the world
      x - the X coordinate
      y - the Y coordinate
      z - 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 - a double[] to store the density values in. if too small or null, a new one will be created
      startIndex - the index to begin storing values into the array at
      biomes - a BiomeMap containing the biomes to be used in the world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
      sizeX - the number of samples to take along the X axis
      sizeY - the number of samples to take along the Y axis
      sizeZ - the number of samples to take along the Z axis
      stepX - the spacing between samples along the X axis
      stepY - the spacing between samples along the Y axis
      stepZ - the spacing between samples along the Z axis
      Returns:
      the density at the given coordinates
    • getId

      org.cloudburstmc.api.util.Identifier getId()
      Specified by:
      getId in interface GenerationPass
      Returns:
      the identifier of this generation pass