Skip to content

Commit 1b17c6b

Browse files
authored
Fix loom usage, and disconnect messages for all outdated clients (#5006)
1 parent 8356b63 commit 1b17c6b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ private boolean setCorrectCodec(int protocolVersion) {
120120
session.disconnect(disconnectMessage);
121121
return false;
122122
} else if (protocolVersion < GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion()) {
123-
if (protocolVersion < Bedrock_v622.CODEC.getProtocolVersion()) {
124-
// https://github.com/GeyserMC/Geyser/issues/4378
125-
session.getUpstream().getSession().setCodec(BedrockCompat.CODEC_LEGACY);
126-
}
123+
// A note on the following line: various older client versions have different forms of DisconnectPacket.
124+
// Using only the latest BedrockCompat for such clients leads to inaccurate disconnect messages: https://github.com/GeyserMC/Geyser/issues/4378
125+
// This updates the BedrockCompat protocol if necessary:
126+
session.getUpstream().getSession().setCodec(BedrockCompat.disconnectCompat(protocolVersion));
127+
127128
session.disconnect(GeyserLocale.getLocaleStringLog("geyser.network.outdated.client", supportedVersions));
128129
return false;
129130
} else {

gradle/libs.versions.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ netty-io-uring = "0.0.25.Final-SNAPSHOT"
1010
guava = "29.0-jre"
1111
gson = "2.3.1" # Provided by Spigot 1.8.8
1212
websocket = "1.5.1"
13-
protocol-connection = "3.0.0.Beta3-20240819.124045-12"
14-
protocol-common = "3.0.0.Beta3-20240819.124045-10"
15-
protocol-codec = "3.0.0.Beta3-20240819.124045-13"
13+
protocol-connection = "3.0.0.Beta4-20240828.162251-1"
14+
protocol-common = "3.0.0.Beta4-20240828.162251-1"
15+
protocol-codec = "3.0.0.Beta4-20240828.162251-1"
1616
raknet = "1.0.0.CR3-20240416.144209-1"
1717
minecraftauth = "4.1.1-20240806.235051-7"
1818
mcprotocollib = "1.21-20240725.013034-16"

0 commit comments

Comments
 (0)