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 org.cloudburstmc.protocol.bedrock.codec.BedrockCodecDefault Bedrock codec that should act as a fallback.static final List<org.cloudburstmc.protocol.bedrock.codec.BedrockCodec>A list of all supported Bedrock versions that can join Geyser -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic @Nullable org.cloudburstmc.protocol.bedrock.codec.BedrockCodecgetBedrockCodec(int protocolVersion) Gets theBedrockPacketCodecof the given protocol version.static org.geysermc.mcprotocollib.protocol.codec.PacketCodecGets thePacketCodecfor Minecraft: Java Edition.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_70orHigher(GeyserSession session) static booleanisPreCreativeInventoryRewrite(int protocolVersion) static booleanisPreWinterDrop(GeyserSession session)
-
Field Details
-
DEFAULT_BEDROCK_CODEC
public static final org.cloudburstmc.protocol.bedrock.codec.BedrockCodec DEFAULT_BEDROCK_CODECDefault Bedrock codec that should act as a fallback. Should represent the latest available release of the game that Geyser supports. -
SUPPORTED_BEDROCK_CODECS
public static final List<org.cloudburstmc.protocol.bedrock.codec.BedrockCodec> SUPPORTED_BEDROCK_CODECSA list of all supported Bedrock versions that can join Geyser
-
-
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
-
isPreWinterDrop
-
isPreCreativeInventoryRewrite
public static boolean isPreCreativeInventoryRewrite(int protocolVersion) -
is1_21_70orHigher
-
getJavaCodec
public static org.geysermc.mcprotocollib.protocol.codec.PacketCodec getJavaCodec()Gets thePacketCodecfor Minecraft: Java Edition.- Returns:
- the packet codec for Minecraft: Java Edition
-
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
-