Record Class NoiseFunction.ShiftedXzSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.generator.NoiseFunction.ShiftedXzSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
NoiseFunction
public static record NoiseFunction.ShiftedXzSampler(DensitySampler shiftX, DensitySampler shiftZ, Noise noise, double xzScale, double yScale)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NoiseThe field for thenoiserecord component.private final DensitySamplerThe field for theshiftXrecord component.private final DensitySamplerThe field for theshiftZrecord component.private final doubleThe field for thexzScalerecord component.private final doubleThe field for theyScalerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionShiftedXzSampler(DensitySampler shiftX, DensitySampler shiftZ, Noise noise, double xzScale, double yScale) Creates an instance of aShiftedXzSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) shiftX()Returns the value of theshiftXrecord component.shiftZ()Returns the value of theshiftZrecord 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 interface DensitySampler
bind
-
Field Details
-
shiftX
The field for theshiftXrecord component. -
shiftZ
The field for theshiftZrecord 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.
-
-
Constructor Details
-
ShiftedXzSampler
public ShiftedXzSampler(DensitySampler shiftX, DensitySampler shiftZ, Noise noise, double xzScale, double yScale) Creates an instance of aShiftedXzSamplerrecord class.- Parameters:
shiftX- the value for theshiftXrecord componentshiftZ- the value for theshiftZrecord componentnoise- the value for thenoiserecord componentxzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord component
-
-
Method Details
-
sampleVolume
- Specified by:
sampleVolumein interfaceDensitySampler
-
sampleValue
- Specified by:
sampleValuein interfaceDensitySampler
-
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. -
shiftX
Returns the value of theshiftXrecord component.- Returns:
- the value of the
shiftXrecord component
-
shiftZ
Returns the value of theshiftZrecord component.- Returns:
- the value of the
shiftZrecord 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
-