Anticipate support for the patch version of 1.19.60

This commit is contained in:
Camotoy 2023-02-15 16:17:38 -05:00
parent ee754c529b
commit 30277d5411
3 changed files with 12 additions and 1 deletions

View file

@ -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());
}
/**

View file

@ -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);

View file

@ -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"