Record Class JavaDimension

java.lang.Object
java.lang.Record
org.geysermc.geyser.level.JavaDimension
Record Components:
piglinSafe - Whether piglins and hoglins are safe from conversion in this dimension. This controls if they have the shaking effect applied in the dimension.

public record JavaDimension(int minY, int maxY, boolean piglinSafe, double worldCoordinateScale) extends Record
Represents the information we store from the current Java dimension
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavaDimension​(int minY, int maxY, boolean piglinSafe, double worldCoordinateScale)
    Creates an instance of a JavaDimension record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    static void
    load​(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, Map<String,​JavaDimension> map)
     
    int
    Returns the value of the maxY record component.
    int
    Returns the value of the minY record component.
    boolean
    Returns the value of the piglinSafe record component.
    Returns a string representation of this record class.
    double
    Returns the value of the worldCoordinateScale record component.

    Methods inherited from class java.lang.Object

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

    • JavaDimension

      public JavaDimension(int minY, int maxY, boolean piglinSafe, double worldCoordinateScale)
      Creates an instance of a JavaDimension record class.
      Parameters:
      minY - the value for the minY record component
      maxY - the value for the maxY record component
      piglinSafe - the value for the piglinSafe record component
      worldCoordinateScale - the value for the worldCoordinateScale record component
  • Method Details

    • load

      public static void load(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, Map<String,​JavaDimension> map)
    • 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
    • maxY

      public int maxY()
      Returns the value of the maxY record component.
      Returns:
      the value of the maxY record component
    • piglinSafe

      public boolean piglinSafe()
      Returns the value of the piglinSafe record component.
      Returns:
      the value of the piglinSafe record component
    • worldCoordinateScale

      public double worldCoordinateScale()
      Returns the value of the worldCoordinateScale record component.
      Returns:
      the value of the worldCoordinateScale record component