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.VisitorNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
DensityFunctions.TwoArgumentSimpleFunction.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctionThe field for theargument1record component.private final DensityFunctionThe field for theargument2record component.private final doubleThe field for themaxValuerecord component.private final doubleThe field for theminValuerecord component.private final DensityFunctions.TwoArgumentSimpleFunction.TypeThe field for thetyperecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODECFields inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionAp2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue) Creates an instance of aAp2record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargument1record component.Returns the value of theargument2record component.doublecompute(DensityFunction.FunctionContext p_208410_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_208414_, DensityFunction.ContextProvider p_208415_) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_208412_) doublemaxValue()Returns the value of themaxValuerecord component.doubleminValue()Returns the value of theminValuerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TwoArgumentSimpleFunction
codec
-
Field Details
-
type
The field for thetyperecord component. -
argument1
The field for theargument1record component. -
argument2
The field for theargument2record component. -
minValue
private final double minValueThe field for theminValuerecord component. -
maxValue
private final double maxValueThe field for themaxValuerecord component.
-
-
Constructor Details
-
Ap2
Ap2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue) Creates an instance of aAp2record class.- Parameters:
type- the value for thetyperecord componentargument1- the value for theargument1record componentargument2- the value for theargument2record componentminValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
mapAll
- Specified by:
mapAllin 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 '=='. -
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceDensityFunctions.TwoArgumentSimpleFunction- Returns:
- the value of the
typerecord component
-
argument1
Returns the value of theargument1record component.- Specified by:
argument1in interfaceDensityFunctions.TwoArgumentSimpleFunction- Returns:
- the value of the
argument1record component
-
argument2
Returns the value of theargument2record component.- Specified by:
argument2in interfaceDensityFunctions.TwoArgumentSimpleFunction- Returns:
- the value of the
argument2record 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
-