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 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
ConstructorsConstructorDescriptionJavaDimension(int minY, int height, boolean piglinSafe, boolean ultrawarm, int bedrockId, boolean isNetherLike, @Nullable net.kyori.adventure.key.Key defaultClock) Creates an instance of aJavaDimensionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebedrockIdrecord component.@Nullable net.kyori.adventure.key.KeyReturns the value of thedefaultClockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanReturns the value of theisNetherLikerecord 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.
-
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 aJavaDimensionrecord class.- Parameters:
minY- the value for theminYrecord componentheight- the value for theheightrecord componentpiglinSafe- the value for thepiglinSaferecord componentultrawarm- the value for theultrawarmrecord componentbedrockId- the value for thebedrockIdrecord componentisNetherLike- the value for theisNetherLikerecord componentdefaultClock- the value for thedefaultClockrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
minY
public int minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord 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
-
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
-
defaultClock
public @Nullable net.kyori.adventure.key.Key defaultClock()Returns the value of thedefaultClockrecord component.- Returns:
- the value of the
defaultClockrecord component
-