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 Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
-
Field Summary
Modifier and TypeFieldDescriptionprivate final double
The field for theargument
record component.private final DensityFunction
The field for theinput
record component.private final double
The field for themaxValue
record component.private final double
The field for theminValue
record component.private final DensityFunctions.MulOrAdd.Type
The field for thespecificType
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC
Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
LOGGER
-
Constructor Summary
ConstructorDescriptionMulOrAdd
(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAdd
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
argument()
Returns the value of theargument
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.input()
Returns the value of theinput
record component.mapAll
(DensityFunction.Visitor p_208761_) double
maxValue()
Returns the value of themaxValue
record component.double
minValue()
Returns the value of theminValue
record component.Returns the value of thespecificType
record component.final String
toString()
Returns a string representation of this record class.double
transform
(double p_208759_) type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.PureTransformer
compute, fillArray
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
codec
-
Field Details
-
specificType
The field for thespecificType
record component. -
input
The field for theinput
record component. -
minValue
private final double minValueThe field for theminValue
record component. -
maxValue
private final double maxValueThe field for themaxValue
record component. -
argument
private final double argumentThe field for theargument
record component.
-
-
Constructor Details
-
MulOrAdd
MulOrAdd(DensityFunctions.MulOrAdd.Type specificType, DensityFunction input, double minValue, double maxValue, double argument) Creates an instance of aMulOrAdd
record class.- Parameters:
specificType
- the value for thespecificType
record componentinput
- the value for theinput
record componentminValue
- the value for theminValue
record componentmaxValue
- the value for themaxValue
record componentargument
- the value for theargument
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceDensityFunctions.TwoArgumentSimpleFunction
-
argument1
- Specified by:
argument1
in interfaceDensityFunctions.TwoArgumentSimpleFunction
-
argument2
- Specified by:
argument2
in interfaceDensityFunctions.TwoArgumentSimpleFunction
-
transform
public double transform(double p_208759_) - Specified by:
transform
in interfaceDensityFunctions.PureTransformer
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
toString
Returns 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. -
hashCode
public 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. -
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 '=='. -
specificType
Returns the value of thespecificType
record component.- Returns:
- the value of the
specificType
record component
-
input
Returns the value of theinput
record component.- Specified by:
input
in interfaceDensityFunctions.PureTransformer
- Returns:
- the value of the
input
record component
-
minValue
public double minValue()Returns the value of theminValue
record component.- Specified by:
minValue
in interfaceDensityFunction
- Returns:
- the value of the
minValue
record component
-
maxValue
public double maxValue()Returns the value of themaxValue
record component.- Specified by:
maxValue
in interfaceDensityFunction
- Returns:
- the value of the
maxValue
record component
-
argument
public double argument()Returns the value of theargument
record component.- Returns:
- the value of the
argument
record component
-