Record Class IntervalSelectFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.IntervalSelectFunction
- All Implemented Interfaces:
DensityFunction
public record IntervalSelectFunction(DensityFunction input, it.unimi.dsi.fastutil.floats.FloatList thresholds, List<DensityFunction> functions)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<IntervalSelectFunction> private final List<DensityFunction> The field for thefunctionsrecord component.private final DensityFunctionThe field for theinputrecord component.private final it.unimi.dsi.fastutil.floats.FloatListThe field for thethresholdsrecord component.private static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.floats.FloatList> Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionIntervalSelectFunction(DensityFunction input, it.unimi.dsi.fastutil.floats.FloatList thresholds, List<DensityFunction> functions) Creates an instance of aIntervalSelectFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<IntervalSelectFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefunctionsrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.range()rewriteChildren(DfRewriteRule rule) it.unimi.dsi.fastutil.floats.FloatListReturns the value of thethresholdsrecord component.final StringtoString()Returns a string representation of this record class.private com.mojang.serialization.DataResult<IntervalSelectFunction> validate()
-
Field Details
-
input
The field for theinputrecord component. -
thresholds
private final it.unimi.dsi.fastutil.floats.FloatList thresholdsThe field for thethresholdsrecord component. -
functions
The field for thefunctionsrecord component. -
THRESHOLDS_CODEC
private static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.floats.FloatList> THRESHOLDS_CODEC -
CODEC
-
-
Constructor Details
-
IntervalSelectFunction
public IntervalSelectFunction(DensityFunction input, it.unimi.dsi.fastutil.floats.FloatList thresholds, List<DensityFunction> functions) Creates an instance of aIntervalSelectFunctionrecord class.- Parameters:
input- the value for theinputrecord componentthresholds- the value for thethresholdsrecord componentfunctions- the value for thefunctionsrecord component
-
-
Method Details
-
validate
-
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). -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
thresholds
public it.unimi.dsi.fastutil.floats.FloatList thresholds()Returns the value of thethresholdsrecord component.- Returns:
- the value of the
thresholdsrecord component
-
functions
Returns the value of thefunctionsrecord component.- Returns:
- the value of the
functionsrecord component
-