mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
This commit is contained in:
parent
46bde0c019
commit
7613bdbafe
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,8 @@ package org.geysermc.geyser.network;
|
|||
import io.netty.buffer.Unpooled;
|
||||
import org.cloudburstmc.protocol.bedrock.BedrockDisconnectReasons;
|
||||
import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec;
|
||||
import org.cloudburstmc.protocol.bedrock.codec.compat.BedrockCompat;
|
||||
import org.cloudburstmc.protocol.bedrock.codec.v622.Bedrock_v622;
|
||||
import org.cloudburstmc.protocol.bedrock.data.ExperimentData;
|
||||
import org.cloudburstmc.protocol.bedrock.data.PacketCompressionAlgorithm;
|
||||
import org.cloudburstmc.protocol.bedrock.data.ResourcePackType;
|
||||
|
@ -108,6 +110,10 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
|||
session.disconnect(disconnectMessage);
|
||||
return false;
|
||||
} else if (protocolVersion < GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion()) {
|
||||
if (protocolVersion < Bedrock_v622.CODEC.getProtocolVersion()) {
|
||||
// https://github.com/GeyserMC/Geyser/issues/4378
|
||||
session.getUpstream().getSession().setCodec(BedrockCompat.CODEC_LEGACY);
|
||||
}
|
||||
session.disconnect(GeyserLocale.getLocaleStringLog("geyser.network.outdated.client", supportedVersions));
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue