Record Class BinaryFunction.ConstAddSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.BinaryFunction.ConstAddSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
BinaryFunction
public static record BinaryFunction.ConstAddSampler(DensitySampler left, float right)
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 floatThe field for therightrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConstAddSampler(DensitySampler left, float right) Creates an instance of aConstAddSamplerrecord 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.floatright()Returns the value of therightrecord 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
private final float rightThe field for therightrecord component.
-
-
Constructor Details
-
ConstAddSampler
Creates an instance of aConstAddSamplerrecord class.- Parameters:
left- the value for theleftrecord componentright- the value for therightrecord 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
public float right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-