Record Class DimensionPadding

java.lang.Object
java.lang.Record
dev.wyck.worldgen.structure.pools.DimensionPadding
Record Components:
bottom - blocks kept clear above the dimension floor
top - blocks kept clear below the dimension ceiling

@NullMarked @AsOf("3.4.0") public record DimensionPadding(int bottom, int top) extends Record
Blocks of clearance a jigsaw structure keeps from the bottom and top of the dimension.
Since:
3.4.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DimensionPadding
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DimensionPadding(int bottom, int top)
    Creates an instance of a DimensionPadding record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the bottom record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    of(int padding)
    Creates padding that is the same at the bottom and top.
    of(int bottom, int top)
    Creates padding.
    int
    top()
    Returns the value of the top record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • DimensionPadding

      public DimensionPadding(int bottom, int top)
      Creates an instance of a DimensionPadding record class.
      Parameters:
      bottom - the value for the bottom record component
      top - the value for the top record component
  • Method Details

    • of

      @AsOf("3.4.0") public static DimensionPadding of(int padding)
      Creates padding that is the same at the bottom and top.
      Parameters:
      padding - blocks kept clear at both ends
      Returns:
      the padding
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") public static DimensionPadding of(int bottom, int top)
      Creates padding.
      Parameters:
      bottom - blocks kept clear above the dimension floor
      top - blocks kept clear below the dimension ceiling
      Returns:
      the padding
      Since:
      3.4.0
    • 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 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.
    • bottom

      public int bottom()
      Returns the value of the bottom record component.
      Returns:
      the value of the bottom record component
    • top

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