Record Class NoiseSettings

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.NoiseSettings

public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical) extends Record
  • Field Details

    • minY

      private final int minY
      The field for the minY record component.
    • height

      private final int height
      The field for the height record component.
    • noiseSizeHorizontal

      private final int noiseSizeHorizontal
      The field for the noiseSizeHorizontal record component.
    • noiseSizeVertical

      private final int noiseSizeVertical
      The field for the noiseSizeVertical record component.
    • CODEC

      public static final com.mojang.serialization.Codec<NoiseSettings> CODEC
    • OVERWORLD_NOISE_SETTINGS

      protected static final NoiseSettings OVERWORLD_NOISE_SETTINGS
    • NETHER_NOISE_SETTINGS

      protected static final NoiseSettings NETHER_NOISE_SETTINGS
    • END_NOISE_SETTINGS

      protected static final NoiseSettings END_NOISE_SETTINGS
    • CAVES_NOISE_SETTINGS

      protected static final NoiseSettings CAVES_NOISE_SETTINGS
    • FLOATING_ISLANDS_NOISE_SETTINGS

      protected static final NoiseSettings FLOATING_ISLANDS_NOISE_SETTINGS
  • Constructor Details

    • NoiseSettings

      public NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical)
      Creates an instance of a NoiseSettings record class.
      Parameters:
      minY - the value for the minY record component
      height - the value for the height record component
      noiseSizeHorizontal - the value for the noiseSizeHorizontal record component
      noiseSizeVertical - the value for the noiseSizeVertical record component
  • Method Details

    • guardY

      private static com.mojang.serialization.DataResult<NoiseSettings> guardY(NoiseSettings p_158721_)
    • create

      public static NoiseSettings create(int p_224526_, int p_224527_, int p_224528_, int p_224529_)
    • getCellHeight

      public int getCellHeight()
    • getCellWidth

      public int getCellWidth()
    • clampToHeightAccessor

      public NoiseSettings clampToHeightAccessor(LevelHeightAccessor p_224531_)
    • 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 '=='.
      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.
    • minY

      public int minY()
      Returns the value of the minY record component.
      Returns:
      the value of the minY record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • noiseSizeHorizontal

      public int noiseSizeHorizontal()
      Returns the value of the noiseSizeHorizontal record component.
      Returns:
      the value of the noiseSizeHorizontal record component
    • noiseSizeVertical

      public int noiseSizeVertical()
      Returns the value of the noiseSizeVertical record component.
      Returns:
      the value of the noiseSizeVertical record component