Record Class SliceFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.SliceFunction
- All Implemented Interfaces:
DensityFunction
public record SliceFunction(Direction.Axis axis, int coordinate, DensityFunction input)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Direction.AxisThe field for theaxisrecord component.static final com.mojang.serialization.MapCodec<SliceFunction> private final intThe field for thecoordinaterecord component.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
ConstructorsConstructorDescriptionSliceFunction(Direction.Axis axis, int coordinate, DensityFunction input) Creates an instance of aSliceFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaxis()Returns the value of theaxisrecord component.com.mojang.serialization.MapCodec<SliceFunction> codec()intReturns the value of thecoordinaterecord component.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
-
axis
The field for theaxisrecord component. -
coordinate
private final int coordinateThe field for thecoordinaterecord component. -
input
The field for theinputrecord component. -
CODEC
-
-
Constructor Details
-
SliceFunction
Creates an instance of aSliceFunctionrecord class.- Parameters:
axis- the value for theaxisrecord componentcoordinate- the value for thecoordinaterecord componentinput- the value for theinputrecord 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. -
axis
Returns the value of theaxisrecord component.- Returns:
- the value of the
axisrecord component
-
coordinate
public int coordinate()Returns the value of thecoordinaterecord component.- Returns:
- the value of the
coordinaterecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-