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
private static record DensityFunctions.MulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument)
extends Record
implements DensityFunctions.TwoArgumentSimpleFunction, DensityFunctions.PureTransformer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier 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 DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODECFields inherited from interface DensityFunctions.TwoArgumentSimpleFunction
LOGGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAddrecord class. -
Method Summary
Modifier 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 visitor) 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 input) type()Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeezeMethods inherited from interface DensityFunctions.PureTransformer
compute, fillArrayMethods inherited from interface DensityFunctions.TwoArgumentSimpleFunction
codec
-
Field Details
-
specificType
The field for thespecificTyperecord component. -
input
The field for theinputrecord component. -
minValue
private final double minValueThe field for theminValuerecord component. -
maxValue
private final double maxValueThe field for themaxValuerecord component. -
argument
private final double argumentThe field for theargumentrecord component.
-
-
Constructor Details
-
MulOrAdd
private MulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAddrecord class.- Parameters:
specificType- the value for thespecificTyperecord componentinput- the value for theinputrecord componentminValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord componentargument- the value for theargumentrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceDensityFunctions.TwoArgumentSimpleFunction
-
argument1
- Specified by:
argument1in interfaceDensityFunctions.TwoArgumentSimpleFunction
-
argument2
- Specified by:
argument2in interfaceDensityFunctions.TwoArgumentSimpleFunction
-
transform
public double transform(double input) - Specified by:
transformin interfaceDensityFunctions.PureTransformer
-
mapAll
- Specified by:
mapAllin 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. -
specificType
Returns the value of thespecificTyperecord component.- Returns:
- the value of the
specificTyperecord component
-
input
Returns the value of theinputrecord component.- Specified by:
inputin interfaceDensityFunctions.PureTransformer- Returns:
- the value of the
inputrecord component
-
minValue
public double minValue()Returns the value of theminValuerecord component.- Specified by:
minValuein interfaceDensityFunction- Returns:
- the value of the
minValuerecord component
-
maxValue
public double maxValue()Returns the value of themaxValuerecord component.- Specified by:
maxValuein interfaceDensityFunction- Returns:
- the value of the
maxValuerecord component
-
argument
public double argument()Returns the value of theargumentrecord component.- Returns:
- the value of the
argumentrecord component
-