Record Class FindTopSurfaceFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.FindTopSurfaceFunction
- All Implemented Interfaces:
DensityFunction
public record FindTopSurfaceFunction(DensityFunction density, DensityFunction upperBound, int lowerBound, int cellHeight)
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 thecellHeightrecord component.static final com.mojang.serialization.MapCodec<FindTopSurfaceFunction> private final DensityFunctionThe field for thedensityrecord component.private final intThe field for thelowerBoundrecord component.private final DensityFunctionThe field for theupperBoundrecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFindTopSurfaceFunction(DensityFunction density, DensityFunction upperBound, int lowerBound, int cellHeight) Creates an instance of aFindTopSurfaceFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecellHeightrecord component.com.mojang.serialization.MapCodec<FindTopSurfaceFunction> codec()density()Returns the value of thedensityrecord component.intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelowerBoundrecord component.range()rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.Returns the value of theupperBoundrecord component.
-
Field Details
-
density
The field for thedensityrecord component. -
upperBound
The field for theupperBoundrecord component. -
lowerBound
private final int lowerBoundThe field for thelowerBoundrecord component. -
cellHeight
private final int cellHeightThe field for thecellHeightrecord component. -
CODEC
-
-
Constructor Details
-
FindTopSurfaceFunction
public FindTopSurfaceFunction(DensityFunction density, DensityFunction upperBound, int lowerBound, int cellHeight) Creates an instance of aFindTopSurfaceFunctionrecord class.- Parameters:
density- the value for thedensityrecord componentupperBound- the value for theupperBoundrecord componentlowerBound- the value for thelowerBoundrecord componentcellHeight- the value for thecellHeightrecord 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. -
density
Returns the value of thedensityrecord component.- Returns:
- the value of the
densityrecord component
-
upperBound
Returns the value of theupperBoundrecord component.- Returns:
- the value of the
upperBoundrecord component
-
lowerBound
public int lowerBound()Returns the value of thelowerBoundrecord component.- Returns:
- the value of the
lowerBoundrecord component
-
cellHeight
public int cellHeight()Returns the value of thecellHeightrecord component.- Returns:
- the value of the
cellHeightrecord component
-