Record Class LerpFunction.ConstFirstSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.LerpFunction.ConstFirstSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
LerpFunction
public static record LerpFunction.ConstFirstSampler(DensitySampler alpha, float first, DensitySampler second)
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 thealpharecord component.private final floatThe field for thefirstrecord component.private final DensitySamplerThe field for thesecondrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConstFirstSampler(DensitySampler alpha, float first, DensitySampler second) Creates an instance of aConstFirstSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalpha()Returns the value of thealpharecord component.final booleanIndicates whether some other object is "equal to" this one.floatfirst()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) second()Returns the value of thesecondrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensitySampler
bind
-
Field Details
-
alpha
The field for thealpharecord component. -
first
private final float firstThe field for thefirstrecord component. -
second
The field for thesecondrecord component.
-
-
Constructor Details
-
ConstFirstSampler
Creates an instance of aConstFirstSamplerrecord class.- Parameters:
alpha- the value for thealpharecord componentfirst- the value for thefirstrecord componentsecond- the value for thesecondrecord 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. -
alpha
Returns the value of thealpharecord component.- Returns:
- the value of the
alpharecord component
-
first
public float first()Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
second
Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-