Record Class BinaryFunction.MaxSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.BinaryFunction.MaxSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
BinaryFunction
public static record BinaryFunction.MaxSampler(DensitySampler left, DensitySampler right, float rightMaxValue)
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 theleftrecord component.private final DensitySamplerThe field for therightrecord component.private final floatThe field for therightMaxValuerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMaxSampler(DensitySampler left, DensitySampler right, float rightMaxValue) Creates an instance of aMaxSamplerrecord 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.left()Returns the value of theleftrecord component.right()Returns the value of therightrecord component.floatReturns the value of therightMaxValuerecord 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.Methods inherited from interface DensitySampler
bind
-
Field Details
-
left
The field for theleftrecord component. -
right
The field for therightrecord component. -
rightMaxValue
private final float rightMaxValueThe field for therightMaxValuerecord component.
-
-
Constructor Details
-
MaxSampler
Creates an instance of aMaxSamplerrecord class.- Parameters:
left- the value for theleftrecord componentright- the value for therightrecord componentrightMaxValue- the value for therightMaxValuerecord 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. -
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
rightMaxValue
public float rightMaxValue()Returns the value of therightMaxValuerecord component.- Returns:
- the value of the
rightMaxValuerecord component
-