Record Class InterpolatedFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.InterpolatedFunction
- All Implemented Interfaces:
DensityFunction
public record InterpolatedFunction(DensityFunction input, int cellSizeXz, int cellSizeY)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thecellSizeXzrecord component.private final intThe field for thecellSizeYrecord component.static final com.mojang.serialization.MapCodec<InterpolatedFunction> private final DensityFunctionThe field for theinputrecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInterpolatedFunction(DensityFunction input, int cellSizeXz, int cellSizeY) Creates an instance of aInterpolatedFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecellSizeXzrecord component.intReturns the value of thecellSizeYrecord component.com.mojang.serialization.MapCodec<InterpolatedFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.range()rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
input
The field for theinputrecord component. -
cellSizeXz
private final int cellSizeXzThe field for thecellSizeXzrecord component. -
cellSizeY
private final int cellSizeYThe field for thecellSizeYrecord component. -
CODEC
-
-
Constructor Details
-
InterpolatedFunction
Creates an instance of aInterpolatedFunctionrecord class.- Parameters:
input- the value for theinputrecord componentcellSizeXz- the value for thecellSizeXzrecord componentcellSizeY- the value for thecellSizeYrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
cellSizeXz
public int cellSizeXz()Returns the value of thecellSizeXzrecord component.- Returns:
- the value of the
cellSizeXzrecord component
-
cellSizeY
public int cellSizeY()Returns the value of thecellSizeYrecord component.- Returns:
- the value of the
cellSizeYrecord component
-