From b029f4ec13fef4718c8ae6efa9a4ed9ca9633558 Mon Sep 17 00:00:00 2001 From: Konicai <71294714+Konicai@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:17:26 -0400 Subject: [PATCH] Re-add isPre1_20_1 method --- .../main/java/org/geysermc/geyser/network/GameProtocol.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 5327cd5c8d8..3d598673d8c 100644 --- a/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java +++ b/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java @@ -78,6 +78,12 @@ public static BedrockCodec getBedrockCodec(int protocolVersion) { return null; } + /* Bedrock convenience methods to gatekeep features and easily remove the check on version removal */ + + public static boolean isPre1_20_10(GeyserSession session) { + return session.getUpstream().getProtocolVersion() < Bedrock_v594.CODEC.getProtocolVersion(); + } + /** * Gets the {@link PacketCodec} for Minecraft: Java Edition. *