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

private static record DensityFunctions.Ap2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue) extends Record implements DensityFunctions.TwoArgumentSimpleFunction
  • Field Details

    • type

      The field for the type record component.
    • argument1

      private final DensityFunction argument1
      The field for the argument1 record component.
    • argument2

      private final DensityFunction argument2
      The field for the argument2 record component.
    • minValue

      private final double minValue
      The field for the minValue record component.
    • maxValue

      private final double maxValue
      The field for the maxValue record component.
  • Constructor Details

    • Ap2

      private Ap2(DensityFunctions.TwoArgumentSimpleFunction.Type type, DensityFunction argument1, DensityFunction argument2, double minValue, double maxValue)
      Creates an instance of a Ap2 record class.
      Parameters:
      type - the value for the type record component
      argument1 - the value for the argument1 record component
      argument2 - the value for the argument2 record component
      minValue - the value for the minValue record component
      maxValue - the value for the maxValue record component
  • Method Details

    • compute

      public double compute(DensityFunction.FunctionContext context)
      Specified by:
      compute in interface DensityFunction
    • fillArray

      public void fillArray(double[] output, DensityFunction.ContextProvider contextProvider)
      Specified by:
      fillArray in interface DensityFunction
    • mapAll

      public DensityFunction mapAll(DensityFunction.Visitor visitor)
      Specified by:
      mapAll in interface DensityFunction
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      Returns the value of the type record component.
      Specified by:
      type in interface DensityFunctions.TwoArgumentSimpleFunction
      Returns:
      the value of the type record component
    • argument1

      public DensityFunction argument1()
      Returns the value of the argument1 record component.
      Specified by:
      argument1 in interface DensityFunctions.TwoArgumentSimpleFunction
      Returns:
      the value of the argument1 record component
    • argument2

      public DensityFunction argument2()
      Returns the value of the argument2 record component.
      Specified by:
      argument2 in interface DensityFunctions.TwoArgumentSimpleFunction
      Returns:
      the value of the argument2 record component
    • minValue

      public double minValue()
      Returns the value of the minValue record component.
      Specified by:
      minValue in interface DensityFunction
      Returns:
      the value of the minValue record component
    • maxValue

      public double maxValue()
      Returns the value of the maxValue record component.
      Specified by:
      maxValue in interface DensityFunction
      Returns:
      the value of the maxValue record component