From d18825e700a31303a7179dc009945e3bb9708ebb Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 29 Nov 2022 17:33:11 +0100 Subject: [PATCH] 1.19.3-pre3 --- build.gradle.kts | 2 +- .../Protocol1_19_1To1_19_3.java | 20 +++++++++++++++++-- gradle/libs.versions.toml | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7221e070..fa162573 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.5.0-22w46a-SNAPSHOT" + version = "4.5.0-1.19.3-pre3-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 6835cdf0..7fd97fbd 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 @@ -93,9 +93,25 @@ public final class Protocol1_19_1To1_19_3 extends BackwardsProtocol { + final int soundId = wrapper.read(Type.VAR_INT); + if (soundId == 0) { + wrapper.passthrough(Type.STRING); // String identifier + wrapper.read(Type.OPTIONAL_FLOAT); // Fixed range + wrapper.setPacketType(ClientboundPackets1_19_1.NAMED_SOUND); + return; + } + + // Normalize the sound id + wrapper.write(Type.VAR_INT, soundId - 1); + }); + } + }); final TagRewriter tagRewriter = new TagRewriter(this); tagRewriter.addEmptyTag(RegistryType.BLOCK, "minecraft:non_flammable_wood"); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 133b6f2d..70514d0b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ metadata.format.version = "1.1" [versions] # ViaVersion -viaver = "4.5.0-22w43a-SNAPSHOT" +viaver = "4.5.0-1.19.3-pre3-SNAPSHOT" # Common provided netty = "4.0.20.Final"