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.
ultrawarm - If this dimension is ultrawarm. Used when calculating movement in lava for client-side vehicles.
bedrockId - the Bedrock dimension ID of this dimension. As a Java dimension can be null in some login cases (e.g. GeyserConnect), make sure the player is logged in before utilizing this field.

public record JavaDimension(int minY, int height, boolean piglinSafe, boolean ultrawarm, int bedrockId, boolean isNetherLike, @Nullable net.kyori.adventure.key.Key defaultClock) extends Record
Represents the information we store from the current Java dimension
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavaDimension(int minY, int height, boolean piglinSafe, boolean ultrawarm, int bedrockId, boolean isNetherLike, @Nullable net.kyori.adventure.key.Key defaultClock)
    Creates an instance of a JavaDimension record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the bedrockId record component.
    @Nullable net.kyori.adventure.key.Key
    Returns the value of the defaultClock record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    boolean
    Returns the value of the isNetherLike record component.
    int
    Returns the value of the minY record component.
    boolean
    Returns the value of the piglinSafe record component.
     
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the ultrawarm 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 height, boolean piglinSafe, boolean ultrawarm, int bedrockId, boolean isNetherLike, @Nullable net.kyori.adventure.key.Key defaultClock)
      Creates an instance of a JavaDimension record class.
      Parameters:
      minY - the value for the minY record component
      height - the value for the height record component
      piglinSafe - the value for the piglinSafe record component
      ultrawarm - the value for the ultrawarm record component
      bedrockId - the value for the bedrockId record component
      isNetherLike - the value for the isNetherLike record component
      defaultClock - the value for the defaultClock record component
  • Method Details

    • read

      public static JavaDimension read(RegistryEntryContext entry)
    • 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 '=='.
      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
    • piglinSafe

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

      public boolean ultrawarm()
      Returns the value of the ultrawarm record component.
      Returns:
      the value of the ultrawarm record component
    • bedrockId

      public int bedrockId()
      Returns the value of the bedrockId record component.
      Returns:
      the value of the bedrockId record component
    • isNetherLike

      public boolean isNetherLike()
      Returns the value of the isNetherLike record component.
      Returns:
      the value of the isNetherLike record component
    • defaultClock

      public @Nullable net.kyori.adventure.key.Key defaultClock()
      Returns the value of the defaultClock record component.
      Returns:
      the value of the defaultClock record component