Record Class DensityFunctions.IntervalSelect
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.IntervalSelect
- All Implemented Interfaces:
DensityFunction
- Enclosing class:
DensityFunctions
private static record DensityFunctions.IntervalSelect(DensityFunction input, it.unimi.dsi.fastutil.doubles.DoubleList thresholds, List<DensityFunction> functions)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.IntervalSelect> static final com.mojang.serialization.MapCodec<DensityFunctions.IntervalSelect> private final List<DensityFunction> The field for thefunctionsrecord component.private final DensityFunctionThe field for theinputrecord component.private final it.unimi.dsi.fastutil.doubles.DoubleListThe field for thethresholdsrecord component.private static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.doubles.DoubleList> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIntervalSelect(DensityFunction input, it.unimi.dsi.fastutil.doubles.DoubleList thresholds, List<DensityFunction> functions) Creates an instance of aIntervalSelectrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()doublecompute(DensityFunction.FunctionContext context) private doublecompute(DensityFunction.FunctionContext context, double input) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] output, DensityFunction.ContextProvider contextProvider) Returns the value of thefunctionsrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.mapChildren(DensityFunction.Visitor visitor) doublemaxValue()doubleminValue()it.unimi.dsi.fastutil.doubles.DoubleListReturns the value of thethresholdsrecord component.final StringtoString()Returns a string representation of this record class.private com.mojang.serialization.DataResult<DensityFunctions.IntervalSelect> validate()Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, mapAll, quarterNegative, square, squeeze
-
Field Details
-
input
The field for theinputrecord component. -
thresholds
private final it.unimi.dsi.fastutil.doubles.DoubleList thresholdsThe field for thethresholdsrecord component. -
functions
The field for thefunctionsrecord component. -
THRESHOLDS_CODEC
private static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.doubles.DoubleList> THRESHOLDS_CODEC -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
IntervalSelect
private IntervalSelect(DensityFunction input, it.unimi.dsi.fastutil.doubles.DoubleList thresholds, List<DensityFunction> functions) Creates an instance of aIntervalSelectrecord class.- Parameters:
input- the value for theinputrecord componentthresholds- the value for thethresholdsrecord componentfunctions- the value for thefunctionsrecord component
-
-
Method Details
-
validate
-
compute
-
compute
- Specified by:
computein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
mapChildren
- Specified by:
mapChildrenin interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein 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.doubles.DoubleList 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
-