Package org.moddingx.libx.sandbox
Class SandBox.Density
java.lang.Object
org.moddingx.libx.sandbox.SandBox.Density
- Enclosing class:
SandBox
Provides some more useful
DensityFunctions density functions.-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.levelgen.DensityFunctionclamp(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.DensityFunctiondebug(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.DensityFunctioninfluence(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 formin_influenceandmax_influence.static net.minecraft.world.level.levelgen.DensityFunctioninfluence(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 formulabase + (min_influence + influence/(max_influence - min_influence))*modifierstatic net.minecraft.world.level.levelgen.DensityFunctionlerp(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 betweenaandbwith mean0and deviation1.static net.minecraft.world.level.levelgen.DensityFunctionlerp(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 betweenaandbdepending on the value ofniveau.static net.minecraft.world.level.levelgen.DensityFunctionsmash(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 of0on the givenaxisto calculate the density.static net.minecraft.world.level.levelgen.DensityFunctionsmashX(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 position0to calculate the density.static net.minecraft.world.level.levelgen.DensityFunctionsmashY(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 position0to calculate the density.static net.minecraft.world.level.levelgen.DensityFunctionsmashZ(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 position0to calculate the density.
-
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 position0to 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 position0to 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 position0to 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 of0on the givenaxisto 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 formin_influenceandmax_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 formulabase + (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 bycoordinate * 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 betweenaandbwith mean0and deviation1.- 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 betweenaandbdepending on the value ofniveau. Forniveau = mean, the influence ofaandbis equal, atniveau = mean - deviationand lower, the result will be the value ofa, atniveau = mean + deviationand higher the result will be the value ofb. -
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.
-