Record Class LerpFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.LerpFunction
- All Implemented Interfaces:
DensityFunction
public record LerpFunction(DensityFunction alpha, DensityFunction first, DensityFunction second)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctionThe field for thealpharecord component.static final com.mojang.serialization.MapCodec<LerpFunction> private final DensityFunctionThe field for thefirstrecord component.private final DensityFunctionThe field for thesecondrecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionLerpFunction(DensityFunction alpha, DensityFunction first, DensityFunction second) Creates an instance of aLerpFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalpha()Returns the value of thealpharecord component.com.mojang.serialization.MapCodec<LerpFunction> codec()intfinal 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.range()rewriteChildren(DfRewriteRule rule) second()Returns the value of thesecondrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
alpha
The field for thealpharecord component. -
first
The field for thefirstrecord component. -
second
The field for thesecondrecord component. -
CODEC
-
-
Constructor Details
-
LerpFunction
Creates an instance of aLerpFunctionrecord class.- Parameters:
alpha- the value for thealpharecord componentfirst- the value for thefirstrecord componentsecond- the value for thesecondrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-