From c895f8a228cf03409cff80414789290ed558e436 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:49:55 +0100 Subject: [PATCH] 1.20.3-pre3 --- build.gradle | 4 ++-- .../viaproxy/injection/mixins/MixinProtocolVersion.java | 2 +- .../viaproxy/proxy/session/BedrockProxyConnection.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 26a9ef9d..031e2192 100644 --- a/build.gradle +++ b/build.gradle @@ -53,8 +53,8 @@ repositories { } dependencies { - include "com.viaversion:viaversion-common:4.9.0-1.20.3-pre2-SNAPSHOT" - include "com.viaversion:viabackwards-common:4.9.0-1.20.3-pre1-SNAPSHOT" + include "com.viaversion:viaversion-common:4.9.0-1.20.3-pre3-SNAPSHOT" + include "com.viaversion:viabackwards-common:4.9.0-1.20.3-pre3-SNAPSHOT" include "com.viaversion:viarewind-common:3.0.4-SNAPSHOT" include("net.raphimc:ViaLegacy:2.2.21-SNAPSHOT") { exclude group: "net.lenni0451.mcstructs", module: "text" diff --git a/src/main/java/net/raphimc/viaproxy/injection/mixins/MixinProtocolVersion.java b/src/main/java/net/raphimc/viaproxy/injection/mixins/MixinProtocolVersion.java index 32f3fe2e..1d819cc4 100644 --- a/src/main/java/net/raphimc/viaproxy/injection/mixins/MixinProtocolVersion.java +++ b/src/main/java/net/raphimc/viaproxy/injection/mixins/MixinProtocolVersion.java @@ -51,7 +51,7 @@ private static void initMaps(CallbackInfo ci) { remaps.put("1.18/1.18.1", new Pair<>("1.18-1.18.1", null)); remaps.put("1.19.1/2", new Pair<>("1.19.1-1.19.2", null)); remaps.put("1.20/1.20.1", new Pair<>("1.20-1.20.1", null)); - remaps.put("1.20.3", new Pair<>("1.20.3-pre2", null)); + remaps.put("1.20.3", new Pair<>("1.20.3-pre3", null)); } @Redirect(method = "", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;")) diff --git a/src/main/java/net/raphimc/viaproxy/proxy/session/BedrockProxyConnection.java b/src/main/java/net/raphimc/viaproxy/proxy/session/BedrockProxyConnection.java index bda9b582..1b057d9c 100644 --- a/src/main/java/net/raphimc/viaproxy/proxy/session/BedrockProxyConnection.java +++ b/src/main/java/net/raphimc/viaproxy/proxy/session/BedrockProxyConnection.java @@ -30,6 +30,7 @@ import net.raphimc.netminecraft.constants.MCPipeline; import net.raphimc.netminecraft.util.LazyLoadBase; import net.raphimc.netminecraft.util.ServerAddress; +import net.raphimc.viabedrock.protocol.data.ProtocolConstants; import net.raphimc.vialoader.netty.VLPipeline; import net.raphimc.vialoader.netty.viabedrock.PingEncapsulationCodec; import net.raphimc.vialoader.util.VersionEnum; @@ -62,7 +63,7 @@ public void initialize(Bootstrap bootstrap) { bootstrap .option(RakChannelOption.CONNECT_TIMEOUT_MILLIS, 4_000) .option(RakChannelOption.IP_TOS, 0x18) - .option(RakChannelOption.RAK_PROTOCOL_VERSION, 11) + .option(RakChannelOption.RAK_PROTOCOL_VERSION, ProtocolConstants.BEDROCK_RAKNET_PROTOCOL_VERSION) .option(RakChannelOption.RAK_CONNECT_TIMEOUT, 4_000L) .option(RakChannelOption.RAK_SESSION_TIMEOUT, 30_000L) .option(RakChannelOption.RAK_GUID, ThreadLocalRandom.current().nextLong())