Class DensityFunctions
java.lang.Object
net.minecraft.world.level.levelgen.DensityFunctions
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
protected static enum
static interface
protected static enum
(package private) static final record
protected static enum
protected static final record
(package private) static final record
protected static final class
static final record
protected static final record
protected static final record
static interface
(package private) static final record
protected static final record
(package private) static interface
(package private) static final record
protected static final record
protected static final record
protected static final record
protected static final record
(package private) static interface
static final record
(package private) static interface
(package private) static interface
protected static final record
(package private) static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec<DensityFunction>
static final com.mojang.serialization.Codec<DensityFunction>
protected static final double
(package private) static final com.mojang.serialization.Codec<Double>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DensityFunction
add
(DensityFunction p_208294_, DensityFunction p_208295_) static DensityFunction
static DensityFunction
blendDensity
(DensityFunction p_208390_) static DensityFunction
static com.mojang.serialization.Codec<? extends DensityFunction>
bootstrap
(Registry<com.mojang.serialization.Codec<? extends DensityFunction>> p_208343_) static DensityFunction
cache2d
(DensityFunction p_208374_) static DensityFunction
cacheAllInCell
(DensityFunction p_208388_) static DensityFunction
cacheOnce
(DensityFunction p_208381_) static DensityFunction
constant
(double p_208265_) (package private) static <O> KeyDispatchDataCodec<O>
doubleFunctionArgumentCodec
(BiFunction<DensityFunction, DensityFunction, O> p_224039_, Function<O, DensityFunction> p_224040_, Function<O, DensityFunction> p_224041_) static DensityFunction
endIslands
(long p_208272_) static DensityFunction
flatCache
(DensityFunction p_208362_) static DensityFunction
interpolated
(DensityFunction p_208282_) static DensityFunction
lerp
(DensityFunction p_224031_, double p_224032_, DensityFunction p_224033_) static DensityFunction
lerp
(DensityFunction p_208302_, DensityFunction p_208303_, DensityFunction p_208304_) (package private) static <O> KeyDispatchDataCodec<O>
makeCodec
(com.mojang.serialization.MapCodec<O> p_224029_) static DensityFunction
map
(DensityFunction p_208313_, DensityFunctions.Mapped.Type p_208314_) private static DensityFunction
mapFromUnitTo
(DensityFunction p_208284_, double p_208285_, double p_208286_) static DensityFunction
mappedNoise
(Holder<NormalNoise.NoiseParameters> p_208328_, double p_208329_, double p_208330_) static DensityFunction
mappedNoise
(Holder<NormalNoise.NoiseParameters> p_208332_, double p_208333_, double p_208334_, double p_208335_) static DensityFunction
mappedNoise
(Holder<NormalNoise.NoiseParameters> p_208337_, double p_208338_, double p_208339_, double p_208340_, double p_208341_) static DensityFunction
max
(DensityFunction p_208383_, DensityFunction p_208384_) static DensityFunction
min
(DensityFunction p_208376_, DensityFunction p_208377_) static DensityFunction
mul
(DensityFunction p_208364_, DensityFunction p_208365_) static DensityFunction
noise
(Holder<NormalNoise.NoiseParameters> p_208323_) static DensityFunction
noise
(Holder<NormalNoise.NoiseParameters> p_208325_, double p_208326_) static DensityFunction
noise
(Holder<NormalNoise.NoiseParameters> p_208369_, double p_208370_, double p_208371_) static DensityFunction
rangeChoice
(DensityFunction p_208288_, double p_208289_, double p_208290_, DensityFunction p_208291_, DensityFunction p_208292_) private static com.mojang.serialization.Codec<? extends DensityFunction>
register
(Registry<com.mojang.serialization.Codec<? extends DensityFunction>> p_224035_, String p_224036_, KeyDispatchDataCodec<? extends DensityFunction> p_224037_) static DensityFunction
shift
(Holder<NormalNoise.NoiseParameters> p_208386_) static DensityFunction
shiftA
(Holder<NormalNoise.NoiseParameters> p_208367_) static DensityFunction
shiftB
(Holder<NormalNoise.NoiseParameters> p_208379_) static DensityFunction
shiftedNoise2d
(DensityFunction p_208297_, DensityFunction p_208298_, double p_208299_, Holder<NormalNoise.NoiseParameters> p_208300_) (package private) static <A,
O> KeyDispatchDataCodec<O> singleArgumentCodec
(com.mojang.serialization.Codec<A> p_224025_, Function<A, O> p_224026_, Function<O, A> p_224027_) (package private) static <O> KeyDispatchDataCodec<O>
singleFunctionArgumentCodec
(Function<DensityFunction, O> p_224043_, Function<O, DensityFunction> p_224044_) static DensityFunction
static DensityFunction
weirdScaledSampler
(DensityFunction p_208316_, Holder<NormalNoise.NoiseParameters> p_208317_, DensityFunctions.WeirdScaledSampler.RarityValueMapper p_208318_) static DensityFunction
yClampedGradient
(int p_208267_, int p_208268_, double p_208269_, double p_208270_) static DensityFunction
zero()
-
Field Details
-
CODEC
-
MAX_REASONABLE_NOISE_VALUE
protected static final double MAX_REASONABLE_NOISE_VALUE- See Also:
-
NOISE_VALUE_CODEC
-
DIRECT_CODEC
-
-
Constructor Details
-
DensityFunctions
private DensityFunctions()
-
-
Method Details
-
bootstrap
public static com.mojang.serialization.Codec<? extends DensityFunction> bootstrap(Registry<com.mojang.serialization.Codec<? extends DensityFunction>> p_208343_) -
register
private static com.mojang.serialization.Codec<? extends DensityFunction> register(Registry<com.mojang.serialization.Codec<? extends DensityFunction>> p_224035_, String p_224036_, KeyDispatchDataCodec<? extends DensityFunction> p_224037_) -
singleArgumentCodec
static <A,O> KeyDispatchDataCodec<O> singleArgumentCodec(com.mojang.serialization.Codec<A> p_224025_, Function<A, O> p_224026_, Function<O, A> p_224027_) -
singleFunctionArgumentCodec
static <O> KeyDispatchDataCodec<O> singleFunctionArgumentCodec(Function<DensityFunction, O> p_224043_, Function<O, DensityFunction> p_224044_) -
doubleFunctionArgumentCodec
static <O> KeyDispatchDataCodec<O> doubleFunctionArgumentCodec(BiFunction<DensityFunction, DensityFunction, O> p_224039_, Function<O, DensityFunction> p_224040_, Function<O, DensityFunction> p_224041_) -
makeCodec
-
interpolated
-
flatCache
-
cache2d
-
cacheOnce
-
cacheAllInCell
-
mappedNoise
public static DensityFunction mappedNoise(Holder<NormalNoise.NoiseParameters> p_208337_, @Deprecated double p_208338_, double p_208339_, double p_208340_, double p_208341_) -
mappedNoise
public static DensityFunction mappedNoise(Holder<NormalNoise.NoiseParameters> p_208332_, double p_208333_, double p_208334_, double p_208335_) -
mappedNoise
public static DensityFunction mappedNoise(Holder<NormalNoise.NoiseParameters> p_208328_, double p_208329_, double p_208330_) -
shiftedNoise2d
public static DensityFunction shiftedNoise2d(DensityFunction p_208297_, DensityFunction p_208298_, double p_208299_, Holder<NormalNoise.NoiseParameters> p_208300_) -
noise
-
noise
public static DensityFunction noise(Holder<NormalNoise.NoiseParameters> p_208369_, double p_208370_, double p_208371_) -
noise
public static DensityFunction noise(Holder<NormalNoise.NoiseParameters> p_208325_, double p_208326_) -
rangeChoice
public static DensityFunction rangeChoice(DensityFunction p_208288_, double p_208289_, double p_208290_, DensityFunction p_208291_, DensityFunction p_208292_) -
shiftA
-
shiftB
-
shift
-
blendDensity
-
endIslands
-
weirdScaledSampler
public static DensityFunction weirdScaledSampler(DensityFunction p_208316_, Holder<NormalNoise.NoiseParameters> p_208317_, DensityFunctions.WeirdScaledSampler.RarityValueMapper p_208318_) -
add
-
mul
-
min
-
max
-
spline
public static DensityFunction spline(CubicSpline<DensityFunctions.Spline.Point, DensityFunctions.Spline.Coordinate> p_224021_) -
zero
-
constant
-
yClampedGradient
public static DensityFunction yClampedGradient(int p_208267_, int p_208268_, double p_208269_, double p_208270_) -
map
public static DensityFunction map(DensityFunction p_208313_, DensityFunctions.Mapped.Type p_208314_) -
mapFromUnitTo
private static DensityFunction mapFromUnitTo(DensityFunction p_208284_, double p_208285_, double p_208286_) -
blendAlpha
-
blendOffset
-
lerp
public static DensityFunction lerp(DensityFunction p_208302_, DensityFunction p_208303_, DensityFunction p_208304_) -
lerp
public static DensityFunction lerp(DensityFunction p_224031_, double p_224032_, DensityFunction p_224033_)
-