From 7173bbbbce541243354c2bf36c6a229385675e7d Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 28 Jun 2022 12:26:55 +0200 Subject: [PATCH] 1.19.1-pre2 (at least an initial pass) --- build.gradle.kts | 2 +- .../Protocol1_18_2To1_19.java | 2 +- .../Protocol1_19To1_19_1.java | 31 +++++++++++++++++++ gradle/libs.versions.toml | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 57657c24..d9956792 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.3.1-1.19.1-pre1-SNAPSHOT" + version = "4.3.1-1.19.1-pre2-SNAPSHOT" description = "Allow older clients to join newer server versions." } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/Protocol1_18_2To1_19.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/Protocol1_18_2To1_19.java index 194a3a7f..162ea0c0 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/Protocol1_18_2To1_19.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_18_2to1_19/Protocol1_18_2To1_19.java @@ -269,7 +269,7 @@ public final class Protocol1_18_2To1_19 extends BackwardsProtocol1.18.2 translation + registerClientbound(ClientboundPackets1_19.SYSTEM_CHAT, new PacketRemapper() { + @Override + public void registerMap() { + map(Type.COMPONENT); + handler(wrapper -> { + if (wrapper.read(Type.BOOLEAN)) { + wrapper.cancel(); + return; + } + + wrapper.write(Type.VAR_INT, 0); // TODO + }); + } + }); + + registerServerbound(State.LOGIN, ServerboundLoginPackets.HELLO.getId(), ServerboundLoginPackets.HELLO.getId(), new PacketRemapper() { + @Override + public void registerMap() { + map(Type.STRING); // Name + // Write empty profile key and uuid + read(Type.OPTIONAL_PROFILE_KEY); + create(Type.OPTIONAL_PROFILE_KEY, null); + create(Type.OPTIONAL_UUID, null); + } + }); } @Override diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 45d692cd..72f8e562 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ metadata.format.version = "1.1" [versions] # ViaVersion -viaver = "4.3.2-1.19.1-pre1-SNAPSHOT" +viaver = "4.3.2-1.19.1-pre2-SNAPSHOT" # Common provided netty = "4.0.20.Final"