Record Class DensityFunctions.RangeChoice
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.RangeChoice
- All Implemented Interfaces:
- DensityFunction
- Enclosing class:
- DensityFunctions
static record DensityFunctions.RangeChoice(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange)
extends Record
implements DensityFunction
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.RangeChoice>static final com.mojang.serialization.MapCodec<DensityFunctions.RangeChoice>private final DensityFunctionThe field for theinputrecord component.private final doubleThe field for themaxExclusiverecord component.private final doubleThe field for theminInclusiverecord component.private final DensityFunctionThe field for thewhenInRangerecord component.private final DensityFunctionThe field for thewhenOutOfRangerecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsConstructorDescriptionRangeChoice(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange) Creates an instance of aRangeChoicerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_208839_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_208843_, DensityFunction.ContextProvider p_208844_) final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.mapAll(DensityFunction.Visitor p_208841_) doubleReturns the value of themaxExclusiverecord component.doublemaxValue()doubleReturns the value of theminInclusiverecord component.doubleminValue()final StringtoString()Returns a string representation of this record class.Returns the value of thewhenInRangerecord component.Returns the value of thewhenOutOfRangerecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctionabs, clamp, cube, halfNegative, quarterNegative, square, squeeze
- 
Field Details- 
inputThe field for theinputrecord component.
- 
minInclusiveprivate final double minInclusiveThe field for theminInclusiverecord component.
- 
maxExclusiveprivate final double maxExclusiveThe field for themaxExclusiverecord component.
- 
whenInRangeThe field for thewhenInRangerecord component.
- 
whenOutOfRangeThe field for thewhenOutOfRangerecord component.
- 
DATA_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
RangeChoiceRangeChoice(DensityFunction input, double minInclusive, double maxExclusive, DensityFunction whenInRange, DensityFunction whenOutOfRange) Creates an instance of aRangeChoicerecord class.- Parameters:
- input- the value for the- inputrecord component
- minInclusive- the value for the- minInclusiverecord component
- maxExclusive- the value for the- maxExclusiverecord component
- whenInRange- the value for the- whenInRangerecord component
- whenOutOfRange- the value for the- whenOutOfRangerecord component
 
 
- 
- 
Method Details- 
compute- Specified by:
- computein interface- DensityFunction
 
- 
fillArray- Specified by:
- fillArrayin interface- DensityFunction
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
minValuepublic double minValue()- Specified by:
- minValuein interface- DensityFunction
 
- 
maxValuepublic double maxValue()- Specified by:
- maxValuein interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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 '=='.
- 
inputReturns the value of theinputrecord component.- Returns:
- the value of the inputrecord component
 
- 
minInclusivepublic double minInclusive()Returns the value of theminInclusiverecord component.- Returns:
- the value of the minInclusiverecord component
 
- 
maxExclusivepublic double maxExclusive()Returns the value of themaxExclusiverecord component.- Returns:
- the value of the maxExclusiverecord component
 
- 
whenInRangeReturns the value of thewhenInRangerecord component.- Returns:
- the value of the whenInRangerecord component
 
- 
whenOutOfRangeReturns the value of thewhenOutOfRangerecord component.- Returns:
- the value of the whenOutOfRangerecord component
 
 
-