Record Class IntervalSelectFunction.SingleThresholdSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.IntervalSelectFunction.SingleThresholdSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
IntervalSelectFunction
private static record IntervalSelectFunction.SingleThresholdSampler(DensitySampler input, float threshold, DensitySampler ifBelow, DensitySampler ifAbove)
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 theifAboverecord component.private final DensitySamplerThe field for theifBelowrecord component.private final DensitySamplerThe field for theinputrecord component.private final floatThe field for thethresholdrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSingleThresholdSampler(DensitySampler input, float threshold, DensitySampler ifBelow, DensitySampler ifAbove) Creates an instance of aSingleThresholdSamplerrecord 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.ifAbove()Returns the value of theifAboverecord component.ifBelow()Returns the value of theifBelowrecord component.input()Returns the value of theinputrecord component.floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) floatReturns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensitySampler
bind
-
Field Details
-
input
The field for theinputrecord component. -
threshold
private final float thresholdThe field for thethresholdrecord component. -
ifBelow
The field for theifBelowrecord component. -
ifAbove
The field for theifAboverecord component.
-
-
Constructor Details
-
SingleThresholdSampler
private SingleThresholdSampler(DensitySampler input, float threshold, DensitySampler ifBelow, DensitySampler ifAbove) Creates an instance of aSingleThresholdSamplerrecord class.- Parameters:
input- the value for theinputrecord componentthreshold- the value for thethresholdrecord componentifBelow- the value for theifBelowrecord componentifAbove- the value for theifAboverecord 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
-
threshold
public float threshold()Returns the value of thethresholdrecord component.- Returns:
- the value of the
thresholdrecord component
-
ifBelow
Returns the value of theifBelowrecord component.- Returns:
- the value of the
ifBelowrecord component
-
ifAbove
Returns the value of theifAboverecord component.- Returns:
- the value of the
ifAboverecord component
-