Record Class NoiseFunction.Sampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.generator.NoiseFunction.Sampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
NoiseFunction
public static record NoiseFunction.Sampler(Noise noise, double xzScale, double yScale)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
Fields -
Constructor Summary
Constructors -
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) 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
-
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
-
Sampler
Creates an instance of aSamplerrecord class.- Parameters:
noise- 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. -
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
-