From 9a9c6c46442a4bb479a4a00259e45232bfbbcdc2 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 26 Oct 2022 18:28:53 +0200 Subject: [PATCH] 22w43a --- build.gradle.kts | 2 +- .../Protocol1_19_1To1_19_3.java | 11 ++--------- .../packets/EntityPackets1_19_3.java | 4 ++-- gradle/libs.versions.toml | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8ce59ab8..082c2a58 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.5.0-22w42a-SNAPSHOT" + version = "4.5.0-22w43a-SNAPSHOT" description = "Allow older clients to join newer server versions." } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/Protocol1_19_1To1_19_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/Protocol1_19_1To1_19_3.java index 81a8f29f..33191fbe 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/Protocol1_19_1To1_19_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/Protocol1_19_1To1_19_3.java @@ -154,10 +154,7 @@ public final class Protocol1_19_1To1_19_3 extends BackwardsProtocol { - wrapper.write(Type.UUID, wrapper.user().get(ChatSessionStorage.class).uuid()); // Session UUID - final ProfileKey profileKey = wrapper.read(Type.OPTIONAL_PROFILE_KEY); - wrapper.write(Type.OPTIONAL_PROFILE_KEY, null); if (profileKey == null) { wrapper.user().put(new NonceStorage(null)); } @@ -184,15 +181,11 @@ public final class Protocol1_19_1To1_19_3 extends BackwardsProtocol { final NonceStorage nonceStorage = wrapper.user().remove(NonceStorage.class); - if (nonceStorage.nonce() == null) { - return; - } final boolean isNonce = wrapper.read(Type.BOOLEAN); - wrapper.write(Type.BOOLEAN, true); - if (!isNonce) { // Should never be true at this point, but /shrug otherwise + if (!isNonce) { wrapper.read(Type.LONG); // Salt wrapper.read(Type.BYTE_ARRAY_PRIMITIVE); // Signature - wrapper.write(Type.BYTE_ARRAY_PRIMITIVE, nonceStorage.nonce()); + wrapper.write(Type.BYTE_ARRAY_PRIMITIVE, nonceStorage.nonce() != null ? nonceStorage.nonce() : new byte[0]); } }); } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java index cca58bda..994a6ab4 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java @@ -126,9 +126,9 @@ public final class EntityPackets1_19_3 extends EntityRewriter