Package org.geysermc.geyser.level
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
ConstructorsConstructorDescriptionJavaDimension(int minY, int maxY, boolean piglinSafe, double worldCoordinateScale) Creates an instance of aJavaDimensionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static voidload(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, Map<String, JavaDimension> map) intmaxY()Returns the value of themaxYrecord component.intminY()Returns the value of theminYrecord component.booleanReturns the value of thepiglinSaferecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of theworldCoordinateScalerecord component.
-
Constructor Details
-
JavaDimension
public JavaDimension(int minY, int maxY, boolean piglinSafe, double worldCoordinateScale) Creates an instance of aJavaDimensionrecord class.- Parameters:
minY- the value for theminYrecord componentmaxY- the value for themaxYrecord componentpiglinSafe- the value for thepiglinSaferecord componentworldCoordinateScale- the value for theworldCoordinateScalerecord component
-
-
Method Details
-
load
public static void load(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, Map<String, JavaDimension> map) -
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. -
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. -
equals
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 '=='. -
minY
public int minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
maxY
public int maxY()Returns the value of themaxYrecord component.- Returns:
- the value of the
maxYrecord component
-
piglinSafe
public boolean piglinSafe()Returns the value of thepiglinSaferecord component.- Returns:
- the value of the
piglinSaferecord component
-
worldCoordinateScale
public double worldCoordinateScale()Returns the value of theworldCoordinateScalerecord component.- Returns:
- the value of the
worldCoordinateScalerecord component
-