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.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 maxY, boolean piglinSafe, boolean ultrawarm, double worldCoordinateScale, int bedrockId, boolean isNetherLike)
extends Record
Represents the information we store from the current Java dimension
-
Constructor Summary
ConstructorsConstructorDescriptionJavaDimension(int minY, int maxY, boolean piglinSafe, boolean ultrawarm, double worldCoordinateScale, int bedrockId, boolean isNetherLike) Creates an instance of aJavaDimensionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebedrockIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisNetherLikerecord component.intmaxY()Returns the value of themaxYrecord component.intminY()Returns the value of theminYrecord component.booleanReturns the value of thepiglinSaferecord component.static JavaDimensionread(RegistryEntryContext entry) final StringtoString()Returns a string representation of this record class.booleanReturns the value of theultrawarmrecord component.doubleReturns the value of theworldCoordinateScalerecord component.
-
Constructor Details
-
JavaDimension
public JavaDimension(int minY, int maxY, boolean piglinSafe, boolean ultrawarm, double worldCoordinateScale, int bedrockId, boolean isNetherLike) Creates an instance of aJavaDimensionrecord class.- Parameters:
minY- the value for theminYrecord componentmaxY- the value for themaxYrecord componentpiglinSafe- the value for thepiglinSaferecord componentultrawarm- the value for theultrawarmrecord componentworldCoordinateScale- the value for theworldCoordinateScalerecord componentbedrockId- the value for thebedrockIdrecord componentisNetherLike- the value for theisNetherLikerecord component
-
-
Method Details
-
read
-
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
-
ultrawarm
public boolean ultrawarm()Returns the value of theultrawarmrecord component.- Returns:
- the value of the
ultrawarmrecord component
-
worldCoordinateScale
public double worldCoordinateScale()Returns the value of theworldCoordinateScalerecord component.- Returns:
- the value of the
worldCoordinateScalerecord component
-
bedrockId
public int bedrockId()Returns the value of thebedrockIdrecord component.- Returns:
- the value of the
bedrockIdrecord component
-
isNetherLike
public boolean isNetherLike()Returns the value of theisNetherLikerecord component.- Returns:
- the value of the
isNetherLikerecord component
-