Record Class DensityFunctions.Slide

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Slide
All Implemented Interfaces:
DensityFunction, DensityFunctions.TransformerWithContext
Enclosing class:
DensityFunctions

protected static record DensityFunctions.Slide(@Nullable NoiseSettings settings, DensityFunction input) extends Record implements DensityFunctions.TransformerWithContext
  • Field Details

    • settings

      @Nullable private final NoiseSettings settings
      The field for the settings record component.
    • input

      private final DensityFunction input
      The field for the input record component.
    • CODEC

      public static final com.mojang.serialization.Codec<DensityFunctions.Slide> CODEC
  • Constructor Details

    • Slide

      protected Slide(@Nullable NoiseSettings settings, DensityFunction input)
      Creates an instance of a Slide record class.
      Parameters:
      settings - the value for the settings record component
      input - the value for the input record component
  • Method Details

    • transform

      public double transform(DensityFunction.FunctionContext p_208980_, double p_208981_)
      Specified by:
      transform in interface DensityFunctions.TransformerWithContext
    • mapAll

      public DensityFunction mapAll(DensityFunction.Visitor p_208983_)
      Specified by:
      mapAll in interface DensityFunction
    • minValue

      public double minValue()
      Specified by:
      minValue in interface DensityFunction
    • maxValue

      public double maxValue()
      Specified by:
      maxValue in interface DensityFunction
    • codec

      public com.mojang.serialization.Codec<? extends DensityFunction> codec()
      Specified by:
      codec in interface DensityFunction
    • input

      public DensityFunction input()
      Returns the value of the input record component.
      Specified by:
      input in interface DensityFunctions.TransformerWithContext
      Returns:
      the value of the input record component
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • settings

      @Nullable public NoiseSettings settings()
      Returns the value of the settings record component.
      Returns:
      the value of the settings record component