Package org.geysermc.geyser.network
Class GameProtocol
java.lang.Object
org.geysermc.geyser.network.GameProtocol
Contains information about the supported protocols in Geyser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe latest Bedrock protocol version that Geyser supports.static final StringThe latest Bedrock Minecraft version that Geyser supports.static final it.unimi.dsi.fastutil.ints.IntListAll bedrock protocol versions that Geyser supportsstatic final List<org.geysermc.geyser.api.util.MinecraftVersion>All bedrock minecraft versions that Geyser supports. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic @Nullable org.cloudburstmc.protocol.bedrock.codec.BedrockCodecgetBedrockCodec(int protocolVersion) Gets theBedrockPacketCodecof the given protocol version.static StringGets the supported Minecraft: Java Edition version.static intGets the supported Minecraft: Java Edition protocol version.Gets the supported Minecraft: Java Edition version names.static booleanis1_21_100(GeyserSession session) static booleanis1_21_110orHigher(int protocolVersion) static booleanis1_21_110orHigher(GeyserSession session)
-
Field Details
-
SUPPORTED_BEDROCK_PROTOCOLS
public static final it.unimi.dsi.fastutil.ints.IntList SUPPORTED_BEDROCK_PROTOCOLSAll bedrock protocol versions that Geyser supports -
SUPPORTED_BEDROCK_VERSIONS
All bedrock minecraft versions that Geyser supports. There may be multiple MinecraftVersions with the same protocol version. -
DEFAULT_BEDROCK_PROTOCOL
public static final int DEFAULT_BEDROCK_PROTOCOLThe latest Bedrock protocol version that Geyser supports. -
DEFAULT_BEDROCK_VERSION
The latest Bedrock Minecraft version that Geyser supports.
-
-
Method Details
-
getBedrockCodec
public static @Nullable org.cloudburstmc.protocol.bedrock.codec.BedrockCodec getBedrockCodec(int protocolVersion) Gets theBedrockPacketCodecof the given protocol version.- Parameters:
protocolVersion- The protocol version to attempt to find- Returns:
- The packet codec, or null if the client's protocol is unsupported
-
is1_21_100
-
is1_21_110orHigher
-
is1_21_110orHigher
public static boolean is1_21_110orHigher(int protocolVersion) -
getJavaVersions
Gets the supported Minecraft: Java Edition version names.- Returns:
- the supported Minecraft: Java Edition version names
-
getJavaProtocolVersion
public static int getJavaProtocolVersion()Gets the supported Minecraft: Java Edition protocol version.- Returns:
- the supported Minecraft: Java Edition protocol version
-
getJavaMinecraftVersion
Gets the supported Minecraft: Java Edition version.- Returns:
- the supported Minecraft: Java Edition version
-
getAllSupportedBedrockVersions
- Returns:
- a string showing all supported Bedrock versions for this Geyser instance
-
getAllSupportedJavaVersions
- Returns:
- a string showing all supported Java versions for this Geyser instance
-