Record Class SliceFunction.YSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.SliceFunction.YSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
SliceFunction
public static record SliceFunction.YSampler(DensitySampler input, int y)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensitySamplerThe field for theinputrecord component.private final intThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionYSampler(DensitySampler input, int y) Creates an instance of aYSamplerrecord 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.input()Returns the value of theinputrecord 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.inty()Returns the value of theyrecord component.Methods inherited from interface DensitySampler
bind
-
Field Details
-
input
The field for theinputrecord component. -
y
private final int yThe field for theyrecord component.
-
-
Constructor Details
-
YSampler
Creates an instance of aYSamplerrecord class.- Parameters:
input- the value for theinputrecord componenty- the value for theyrecord 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. -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-