Record Class BlendedNoise
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.synth.BlendedNoise
- All Implemented Interfaces:
DensityFunction
public record BlendedNoise(double xzScale, double yScale, double xzFactor, double yFactor, double smearScaleMultiplier)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doublestatic final com.mojang.serialization.MapCodec<BlendedNoise> private static final doubleprivate static final intprivate static final doubleprivate static final intstatic final Identifierprivate static final com.mojang.serialization.Codec<Double> private final doubleThe field for thesmearScaleMultiplierrecord component.private final doubleThe field for thexzFactorrecord component.private final doubleThe field for thexzScalerecord component.private final doubleThe field for theyFactorrecord component.private final doubleThe field for theyScalerecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionBlendedNoise(double xzScale, double yScale, double xzFactor, double yFactor, double smearScaleMultiplier) Creates an instance of aBlendedNoiserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<BlendedNoise> codec()compileSampler(RandomSource random) private static IntervalcomputeFbmRange(int firstOctave, double smearScaleY, double valueFactor) static NoiseStackcreateFbm(RandomSource random, int firstOctave, double smearScaleY, double valueFactor) createFbmSet(RandomSource random) intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.range()rewriteChildren(DfRewriteRule rule) doubleReturns the value of thesmearScaleMultiplierrecord component.final StringtoString()Returns a string representation of this record class.doublexzFactor()Returns the value of thexzFactorrecord component.private doubledoublexzScale()Returns the value of thexzScalerecord component.doubleyFactor()Returns the value of theyFactorrecord component.private doubledoubleyScale()Returns the value of theyScalerecord component.
-
Field Details
-
xzScale
private final double xzScaleThe field for thexzScalerecord component. -
yScale
private final double yScaleThe field for theyScalerecord component. -
xzFactor
private final double xzFactorThe field for thexzFactorrecord component. -
yFactor
private final double yFactorThe field for theyFactorrecord component. -
smearScaleMultiplier
private final double smearScaleMultiplierThe field for thesmearScaleMultiplierrecord component. -
SCALE_RANGE
-
CODEC
-
BASE_SCALE
private static final double BASE_SCALE- See Also:
-
LIMIT_FACTOR
private static final double LIMIT_FACTOR- See Also:
-
MAIN_FACTOR
private static final double MAIN_FACTOR- See Also:
-
LIMIT_FIRST_OCTAVE
private static final int LIMIT_FIRST_OCTAVE- See Also:
-
MAIN_FIRST_OCTAVE
private static final int MAIN_FIRST_OCTAVE- See Also:
-
NOISE_SEED
-
-
Constructor Details
-
BlendedNoise
public BlendedNoise(double xzScale, double yScale, double xzFactor, double yFactor, double smearScaleMultiplier) Creates an instance of aBlendedNoiserecord class.- Parameters:
xzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord componentxzFactor- the value for thexzFactorrecord componentyFactor- the value for theyFactorrecord componentsmearScaleMultiplier- the value for thesmearScaleMultiplierrecord component
-
-
Method Details
-
xzMultiplier
private double xzMultiplier() -
yMultiplier
private double yMultiplier() -
createFbmSet
-
createFbm
public static NoiseStack createFbm(RandomSource random, int firstOctave, double smearScaleY, double valueFactor) -
computeFbmRange
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
compileSampler
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
xzScale
public double xzScale()Returns the value of thexzScalerecord component.- Returns:
- the value of the
xzScalerecord component
-
yScale
public double yScale()Returns the value of theyScalerecord component.- Returns:
- the value of the
yScalerecord component
-
xzFactor
public double xzFactor()Returns the value of thexzFactorrecord component.- Returns:
- the value of the
xzFactorrecord component
-
yFactor
public double yFactor()Returns the value of theyFactorrecord component.- Returns:
- the value of the
yFactorrecord component
-
smearScaleMultiplier
public double smearScaleMultiplier()Returns the value of thesmearScaleMultiplierrecord component.- Returns:
- the value of the
smearScaleMultiplierrecord component
-