Record Class DensityFunctions.MulOrAdd
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.MulOrAdd
- All Implemented Interfaces:
- DensityFunction,- DensityFunctions.PureTransformer,- DensityFunctions.TwoArgumentSimpleFunction
- Enclosing class:
- DensityFunctions
static record DensityFunctions.MulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument)
extends Record
implements DensityFunctions.PureTransformer, DensityFunctions.TwoArgumentSimpleFunction
- 
Nested Class SummaryNested ClassesNested 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 TypeFieldDescriptionprivate final doubleThe field for theargumentrecord component.private final DensityFunctionThe field for theinputrecord component.private final doubleThe field for themaxValuerecord component.private final doubleThe field for theminValuerecord component.private final DensityFunctions.MulOrAdd.TypeThe field for thespecificTyperecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionCODEC, DIRECT_CODEC, HOLDER_HELPER_CODECFields inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunctionLOGGER
- 
Constructor SummaryConstructorsConstructorDescriptionMulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAddrecord class.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleargument()Returns the value of theargumentrecord component.final 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.mapAll(DensityFunction.Visitor p_208761_) doublemaxValue()Returns the value of themaxValuerecord component.doubleminValue()Returns the value of theminValuerecord component.Returns the value of thespecificTyperecord component.final StringtoString()Returns a string representation of this record class.doubletransform(double p_208759_) type()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, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.PureTransformercompute, fillArrayMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunctioncodec
- 
Field Details- 
specificTypeThe field for thespecificTyperecord component.
- 
inputThe field for theinputrecord component.
- 
minValueprivate final double minValueThe field for theminValuerecord component.
- 
maxValueprivate final double maxValueThe field for themaxValuerecord component.
- 
argumentprivate final double argumentThe field for theargumentrecord component.
 
- 
- 
Constructor Details- 
MulOrAddMulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAddrecord class.- Parameters:
- specificType- the value for the- specificTyperecord component
- input- the value for the- inputrecord component
- minValue- the value for the- minValuerecord component
- maxValue- the value for the- maxValuerecord component
- argument- the value for the- argumentrecord component
 
 
- 
- 
Method Details- 
type- Specified by:
- typein interface- DensityFunctions.TwoArgumentSimpleFunction
 
- 
argument1- Specified by:
- argument1in interface- DensityFunctions.TwoArgumentSimpleFunction
 
- 
argument2- Specified by:
- argument2in interface- DensityFunctions.TwoArgumentSimpleFunction
 
- 
transformpublic double transform(double p_208759_) - Specified by:
- transformin interface- DensityFunctions.PureTransformer
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
inputReturns the value of theinputrecord component.- Specified by:
- inputin interface- DensityFunctions.PureTransformer
- Returns:
- the value of the inputrecord component
 
- 
minValuepublic double minValue()Returns the value of theminValuerecord component.- Specified by:
- minValuein interface- DensityFunction
- Returns:
- the value of the minValuerecord component
 
- 
maxValuepublic double maxValue()Returns the value of themaxValuerecord component.- Specified by:
- maxValuein interface- DensityFunction
- Returns:
- the value of the maxValuerecord component
 
- 
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 '=='.
- 
specificTypeReturns the value of thespecificTyperecord component.- Returns:
- the value of the specificTyperecord component
 
- 
argumentpublic double argument()Returns the value of theargumentrecord component.- Returns:
- the value of the argumentrecord component
 
 
-