Record Class NoiseFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.generator.NoiseFunction
- All Implemented Interfaces:
DensityFunction
public record NoiseFunction(Holder<NormalNoise> noise, double xzScale, double yScale, DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<NoiseFunction> private final Holder<NormalNoise> The field for thenoiserecord component.private final DensityFunctionThe field for theshiftXrecord component.private final DensityFunctionThe field for theshiftYrecord component.private final DensityFunctionThe field for theshiftZrecord component.private final doubleDeprecated.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
ConstructorsConstructorDescriptionNoiseFunction(Holder<NormalNoise> noise, double xzScale, double yScale, DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ) Creates an instance of aNoiseFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<NoiseFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.noise()Returns the value of thenoiserecord component.range()rewriteChildren(DfRewriteRule rule) shiftX()Returns the value of theshiftXrecord component.shiftY()Returns the value of theshiftYrecord component.shiftZ()Returns the value of theshiftZrecord component.final StringtoString()Returns a string representation of this record class.doublexzScale()Deprecated.doubleyScale()Returns the value of theyScalerecord component.
-
Field Details
-
noise
The field for thenoiserecord component. -
xzScale
-
yScale
private final double yScaleThe field for theyScalerecord component. -
shiftX
The field for theshiftXrecord component. -
shiftY
The field for theshiftYrecord component. -
shiftZ
The field for theshiftZrecord component. -
CODEC
-
-
Constructor Details
-
NoiseFunction
public NoiseFunction(Holder<NormalNoise> noise, @Deprecated double xzScale, double yScale, DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ) Creates an instance of aNoiseFunctionrecord class.- Parameters:
noise- the value for thenoiserecord componentxzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord componentshiftX- the value for theshiftXrecord componentshiftY- the value for theshiftYrecord componentshiftZ- the value for theshiftZrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin interfaceDensityFunction
-
codec
- Specified by:
codecin 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
noise
Returns the value of thenoiserecord component.- Returns:
- the value of the
noiserecord component
-
xzScale
Deprecated.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
-
shiftX
Returns the value of theshiftXrecord component.- Returns:
- the value of the
shiftXrecord component
-
shiftY
Returns the value of theshiftYrecord component.- Returns:
- the value of the
shiftYrecord component
-
shiftZ
Returns the value of theshiftZrecord component.- Returns:
- the value of the
shiftZrecord component
-