Package org.geysermc.geyser.util
Class DimensionUtils
java.lang.Object
org.geysermc.geyser.util.DimensionUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfastSwitchDimension(GeyserSession session, int bedrockDimension) Switch dimensions without clearing internal logic.static intgetTemporaryDimension(int currentBedrockDimension, int newBedrockDimension) Gets the fake, temporary dimension we send clients to so we aren't switching to the same dimension without an additional dimension switch.static intjavaToBedrock(String javaDimension) Map the Java edition dimension IDs to Bedrock editionstatic intjavaToBedrock(GeyserSession session) Gets the Bedrock dimension ID, with a safety check if a packet is created before the player is logged/spawned in.static voidsetBedrockDimension(GeyserSession session, int bedrockDimension) static voidswitchDimension(GeyserSession session, JavaDimension javaDimension) static voidswitchDimension(GeyserSession session, JavaDimension javaDimension, int bedrockDimension)
-
Field Details
-
BEDROCK_FOG_HELL
- See Also:
-
-
Constructor Details
-
DimensionUtils
public DimensionUtils()
-
-
Method Details
-
switchDimension
-
switchDimension
public static void switchDimension(GeyserSession session, JavaDimension javaDimension, int bedrockDimension) -
fastSwitchDimension
Switch dimensions without clearing internal logic. -
setBedrockDimension
-
javaToBedrock
Map the Java edition dimension IDs to Bedrock edition- Parameters:
javaDimension- Dimension ID to convert- Returns:
- Converted Bedrock edition dimension ID
-
javaToBedrock
Gets the Bedrock dimension ID, with a safety check if a packet is created before the player is logged/spawned in. -
getTemporaryDimension
public static int getTemporaryDimension(int currentBedrockDimension, int newBedrockDimension) Gets the fake, temporary dimension we send clients to so we aren't switching to the same dimension without an additional dimension switch.- Parameters:
currentBedrockDimension- the current dimension of the playernewBedrockDimension- the new dimension that the player will be transferred to- Returns:
- the Bedrock fake dimension to transfer to
-