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.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 formin_influence
andmax_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 formulabase + (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 betweena
andb
with mean0
and deviation1
.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 betweena
andb
depending on the value ofniveau
.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 of0
on the givenaxis
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 position0
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 position0
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 position0
to 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 position0
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 position0
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 position0
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 of0
on the givenaxis
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 formin_influence
andmax_influence
. -
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 betweena
andb
with mean0
and deviation1
. -
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 betweena
andb
depending on the value ofniveau
. Forniveau = mean
, the influence ofa
andb
is equal, atniveau = mean - deviation
and lower, the result will be the value ofa
, atniveau = mean + deviation
and 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.
-