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 804187075..099a2305a 100644 --- a/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java +++ b/core/src/main/java/org/geysermc/geyser/network/GameProtocol.java @@ -75,6 +75,10 @@ public final class GameProtocol { .minecraftVersion("1.19.50/1.19.51") .build()); SUPPORTED_BEDROCK_CODECS.add(Bedrock_v567.V567_CODEC); + // So the version checker will work + SUPPORTED_BEDROCK_CODECS.add(Bedrock_v567.V567_CODEC.toBuilder() + .protocolVersion(568) + .build()); } /** diff --git a/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java b/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java index a72d8ab9e..26c463bb0 100644 --- a/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java +++ b/core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java @@ -31,6 +31,8 @@ import com.nukkitx.protocol.bedrock.data.ExperimentData; import com.nukkitx.protocol.bedrock.data.PacketCompressionAlgorithm; import com.nukkitx.protocol.bedrock.data.ResourcePackType; import com.nukkitx.protocol.bedrock.packet.*; +import com.nukkitx.protocol.bedrock.v567.Bedrock_v567; +import com.nukkitx.protocol.bedrock.v567.Bedrock_v567patch; import org.geysermc.geyser.Constants; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.api.network.AuthType; @@ -141,6 +143,11 @@ public class UpstreamPacketHandler extends LoggingPacketHandler { return true; } + // Hack for... whatever this is + if (loginPacket.getProtocolVersion() == Bedrock_v567.V567_CODEC.getProtocolVersion() && !session.getClientData().getGameVersion().equals("1.19.60")) { + session.getUpstream().getSession().setPacketCodec(Bedrock_v567patch.BEDROCK_V567PATCH); + } + PlayStatusPacket playStatus = new PlayStatusPacket(); playStatus.setStatus(PlayStatusPacket.Status.LOGIN_SUCCESS); session.sendUpstreamPacket(playStatus); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 14ca47155..986fae748 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ netty = "4.1.80.Final" guava = "29.0-jre" gson = "2.3.1" # Provided by Spigot 1.8.8 websocket = "1.5.1" -protocol = "2.9.16-20230205.181702-1" +protocol = "2.9.16-20230215.204900-2" raknet = "1.6.28-20220125.214016-6" mcauthlib = "d9d773e" mcprotocollib = "1.19.3-20230107.194116-10"