Record Class DensityFunctions.Noise
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Noise
- All Implemented Interfaces:
DensityFunction,DensityFunction.SimpleFunction
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.Noise(Holder<NormalNoise.NoiseParameters> noiseData, @Nullable NormalNoise noise, double xzScale, double yScale)
extends Record
implements DensityFunction.SimpleFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.Noise>static final com.mojang.serialization.MapCodec<DensityFunctions.Noise>private final NormalNoiseThe field for thenoiserecord component.private final Holder<NormalNoise.NoiseParameters>The field for thenoiseDatarecord component.private final doubleThe field for thexzScalerecord component.private final doubleThe field for theyScalerecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNoise(Holder<NormalNoise.NoiseParameters> noiseData, NormalNoise noise, double xzScale, double yScale) Creates an instance of aNoiserecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_208800_) static DensityFunctions.NoisecreateUnseeded(Holder<NormalNoise.NoiseParameters> p_208802_, double p_208803_, double p_208804_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemaxValue()doubleminValue()noise()Returns the value of thenoiserecord component.Returns the value of thenoiseDatarecord component.final StringtoString()Returns a string representation of this record class.doublexzScale()Returns the value of thexzScalerecord component.doubleyScale()Returns the value of theyScalerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction.SimpleFunction
fillArray, mapAll
-
Field Details
-
noiseData
The field for thenoiseDatarecord component. -
noise
The field for thenoiserecord component. -
xzScale
private final double xzScaleThe field for thexzScalerecord component. -
yScale
private final double yScaleThe field for theyScalerecord component. -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
Noise
protected Noise(Holder<NormalNoise.NoiseParameters> noiseData, @Nullable NormalNoise noise, double xzScale, double yScale) Creates an instance of aNoiserecord class.- Parameters:
noiseData- the value for thenoiseDatarecord componentnoise- the value for thenoiserecord componentxzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord component
-
-
Method Details
-
createUnseeded
public static DensityFunctions.Noise createUnseeded(Holder<NormalNoise.NoiseParameters> p_208802_, @Deprecated double p_208803_, double p_208804_) -
compute
- Specified by:
computein interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
noiseData
Returns the value of thenoiseDatarecord component.- Returns:
- the value of the
noiseDatarecord component
-
noise
Returns the value of thenoiserecord component.- Returns:
- the value of the
noiserecord component
-
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
-