Record Class LerpFunction.ConstSecondSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.LerpFunction.ConstSecondSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
LerpFunction
public static record LerpFunction.ConstSecondSampler(DensitySampler alpha, DensitySampler first, float 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 DensitySamplerThe field for thefirstrecord component.private final floatThe field for thesecondrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConstSecondSampler(DensitySampler alpha, DensitySampler first, float second) Creates an instance of aConstSecondSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalpha()Returns the value of thealpharecord component.final booleanIndicates whether some other object is "equal to" this one.first()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) floatsecond()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
The field for thefirstrecord component. -
second
private final float secondThe field for thesecondrecord component.
-
-
Constructor Details
-
ConstSecondSampler
Creates an instance of aConstSecondSamplerrecord 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
Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
second
public float second()Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-