Class SandBox.Density

java.lang.Object
org.moddingx.libx.sandbox.SandBox.Density
Enclosing class:
SandBox

public static class SandBox.Density extends Object
Provides some more useful DensityFunctions density functions.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.levelgen.DensityFunction
    clamp(net.minecraft.world.level.levelgen.DensityFunction density, double min, double max)
    Clamps the given density function between the given values.
    static net.minecraft.world.level.levelgen.DensityFunction
    debug(net.minecraft.core.Direction.Axis axis, double scale)
    Creates a new density function that constantly increases along one coordinate axis.
    static net.minecraft.world.level.levelgen.DensityFunction
    influence(net.minecraft.world.level.levelgen.DensityFunction base, net.minecraft.world.level.levelgen.DensityFunction modifier, net.minecraft.world.level.levelgen.DensityFunction influence)
    Creates a new influence density function with automatically filled out values for min_influence and max_influence.
    static net.minecraft.world.level.levelgen.DensityFunction
    influence(net.minecraft.world.level.levelgen.DensityFunction base, net.minecraft.world.level.levelgen.DensityFunction modifier, net.minecraft.world.level.levelgen.DensityFunction influence, double minInfluence, double maxInfluence)
    Creates a new density function using the formula base + (min_influence + influence/(max_influence - min_influence))*modifier
    static net.minecraft.world.level.levelgen.DensityFunction
    lerp(net.minecraft.world.level.levelgen.DensityFunction a, net.minecraft.world.level.levelgen.DensityFunction b, net.minecraft.world.level.levelgen.DensityFunction niveau)
    Creates a new density function that lerps between a and b with mean 0 and deviation 1.
    static net.minecraft.world.level.levelgen.DensityFunction
    lerp(net.minecraft.world.level.levelgen.DensityFunction a, net.minecraft.world.level.levelgen.DensityFunction b, net.minecraft.world.level.levelgen.DensityFunction niveau, double mean, double deviation)
    Creates a new density function that lerps between a and b depending on the value of niveau.
    static net.minecraft.world.level.levelgen.DensityFunction
    smash(net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.core.Direction.Axis axis)
    Creates a new density function that uses the given density function to calculate density values, but always uses a block position of 0 on the given axis to calculate the density.
    static net.minecraft.world.level.levelgen.DensityFunction
    smashX(net.minecraft.world.level.levelgen.DensityFunction density)
    Creates a new density function that uses the given density function to calculate density values, but always uses x block position 0 to calculate the density.
    static net.minecraft.world.level.levelgen.DensityFunction
    smashY(net.minecraft.world.level.levelgen.DensityFunction density)
    Creates a new density function that uses the given density function to calculate density values, but always uses y block position 0 to calculate the density.
    static net.minecraft.world.level.levelgen.DensityFunction
    smashZ(net.minecraft.world.level.levelgen.DensityFunction density)
    Creates a new density function that uses the given density function to calculate density values, but always uses z block position 0 to calculate the density.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • smashX

      public static net.minecraft.world.level.levelgen.DensityFunction smashX(net.minecraft.world.level.levelgen.DensityFunction density)
      Creates a new density function that uses the given density function to calculate density values, but always uses x block position 0 to calculate the density.
    • smashY

      public static net.minecraft.world.level.levelgen.DensityFunction smashY(net.minecraft.world.level.levelgen.DensityFunction density)
      Creates a new density function that uses the given density function to calculate density values, but always uses y block position 0 to calculate the density.
    • smashZ

      public static net.minecraft.world.level.levelgen.DensityFunction smashZ(net.minecraft.world.level.levelgen.DensityFunction density)
      Creates a new density function that uses the given density function to calculate density values, but always uses z block position 0 to calculate the density.
    • smash

      public static net.minecraft.world.level.levelgen.DensityFunction smash(net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.core.Direction.Axis axis)
      Creates a new density function that uses the given density function to calculate density values, but always uses a block position of 0 on the given axis to calculate the density.
    • influence

      public static net.minecraft.world.level.levelgen.DensityFunction influence(net.minecraft.world.level.levelgen.DensityFunction base, net.minecraft.world.level.levelgen.DensityFunction modifier, net.minecraft.world.level.levelgen.DensityFunction influence)
      Creates a new influence density function with automatically filled out values for min_influence and max_influence.
      See Also:
    • influence

      public static net.minecraft.world.level.levelgen.DensityFunction influence(net.minecraft.world.level.levelgen.DensityFunction base, net.minecraft.world.level.levelgen.DensityFunction modifier, net.minecraft.world.level.levelgen.DensityFunction influence, double minInfluence, double maxInfluence)
      Creates a new density function using the formula base + (min_influence + influence/(max_influence - min_influence))*modifier
    • debug

      public static net.minecraft.world.level.levelgen.DensityFunction debug(net.minecraft.core.Direction.Axis axis, double scale)
      Creates a new density function that constantly increases along one coordinate axis. This is mainly useful for debugging purposes. The density value is given by coordinate * scale.
    • lerp

      public static net.minecraft.world.level.levelgen.DensityFunction lerp(net.minecraft.world.level.levelgen.DensityFunction a, net.minecraft.world.level.levelgen.DensityFunction b, net.minecraft.world.level.levelgen.DensityFunction niveau)
      Creates a new density function that lerps between a and b with mean 0 and deviation 1.
      See Also:
    • lerp

      public static net.minecraft.world.level.levelgen.DensityFunction lerp(net.minecraft.world.level.levelgen.DensityFunction a, net.minecraft.world.level.levelgen.DensityFunction b, net.minecraft.world.level.levelgen.DensityFunction niveau, double mean, double deviation)
      Creates a new density function that lerps between a and b depending on the value of niveau. For niveau = mean, the influence of a and b is equal, at niveau = mean - deviation and lower, the result will be the value of a, at niveau = mean + deviation and higher the result will be the value of b.
    • clamp

      public static net.minecraft.world.level.levelgen.DensityFunction clamp(net.minecraft.world.level.levelgen.DensityFunction density, double min, double max)
      Clamps the given density function between the given values.