Record Class DensityFunctions.Ap2
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Ap2
- All Implemented Interfaces:
DensityFunction
,DensityFunctions.TwoArgumentSimpleFunction
- Enclosing class:
DensityFunctions
static record DensityFunctions.Ap2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue)
extends Record
implements 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
Nested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
DensityFunctions.TwoArgumentSimpleFunction.Type
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DensityFunction
The field for theargument1
record component.private final DensityFunction
The field for theargument2
record component.private final double
The field for themaxValue
record component.private final double
The field for theminValue
record component.private final DensityFunctions.TwoArgumentSimpleFunction.Type
The field for thetype
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
ConstructorDescriptionAp2
(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue) Creates an instance of aAp2
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargument1
record component.Returns the value of theargument2
record component.double
compute
(DensityFunction.FunctionContext p_208410_) final boolean
Indicates whether some other object is "equal to" this one.void
fillArray
(double[] p_208414_, DensityFunction.ContextProvider p_208415_) final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_208412_) double
maxValue()
Returns the value of themaxValue
record component.double
minValue()
Returns the value of theminValue
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.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.TwoArgumentSimpleFunction
codec
-
Field Details
-
type
The field for thetype
record component. -
argument1
The field for theargument1
record component. -
argument2
The field for theargument2
record component. -
minValue
private final double minValueThe field for theminValue
record component. -
maxValue
private final double maxValueThe field for themaxValue
record component.
-
-
Constructor Details
-
Ap2
Ap2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue) Creates an instance of aAp2
record class.- Parameters:
type
- the value for thetype
record componentargument1
- the value for theargument1
record componentargument2
- the value for theargument2
record componentminValue
- the value for theminValue
record componentmaxValue
- the value for themaxValue
record component
-
-
Method Details
-
compute
- Specified by:
compute
in interfaceDensityFunction
-
fillArray
- Specified by:
fillArray
in interfaceDensityFunction
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
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
-
type
Returns the value of thetype
record component.- Specified by:
type
in interfaceDensityFunctions.TwoArgumentSimpleFunction
- Returns:
- the value of the
type
record component
-
argument1
Returns the value of theargument1
record component.- Specified by:
argument1
in interfaceDensityFunctions.TwoArgumentSimpleFunction
- Returns:
- the value of the
argument1
record component
-
argument2
Returns the value of theargument2
record component.- Specified by:
argument2
in interfaceDensityFunctions.TwoArgumentSimpleFunction
- Returns:
- the value of the
argument2
record component
-
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 '=='.
-