From f825007d9a5e5c3856aa09e05786f4dcb1f4102a Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:39:43 -0400 Subject: [PATCH] Support Bedrock 1.21.2 --- .../org/geysermc/geyser/network/GameProtocol.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java b/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java index 1e9e76205..c79ef365d 100644 --- a/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java +++ b/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java @@ -43,13 +43,17 @@ import java.util.StringJoiner; */ public final class GameProtocol { + // Surprise protocol bump WOW + private static final BedrockCodec BEDROCK_V686 = Bedrock_v685.CODEC.toBuilder() + .protocolVersion(686) + .minecraftVersion("1.21.2") + .build(); + /** * Default Bedrock codec that should act as a fallback. Should represent the latest available * release of the game that Geyser supports. */ - public static final BedrockCodec DEFAULT_BEDROCK_CODEC = CodecProcessor.processCodec(Bedrock_v685.CODEC.toBuilder() - .minecraftVersion("1.21.1") - .build()); + public static final BedrockCodec DEFAULT_BEDROCK_CODEC = CodecProcessor.processCodec(BEDROCK_V686); /** * A list of all supported Bedrock versions that can join Geyser @@ -66,9 +70,10 @@ public final class GameProtocol { SUPPORTED_BEDROCK_CODECS.add(CodecProcessor.processCodec(Bedrock_v671.CODEC.toBuilder() .minecraftVersion("1.20.80/1.20.81") .build())); - SUPPORTED_BEDROCK_CODECS.add(CodecProcessor.processCodec(DEFAULT_BEDROCK_CODEC.toBuilder() + SUPPORTED_BEDROCK_CODECS.add(CodecProcessor.processCodec(Bedrock_v685.CODEC.toBuilder() .minecraftVersion("1.21.0/1.21.1") .build())); + SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC); } /**