diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index fb8be24b..68297504 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -8,5 +8,5 @@ repositories { dependencies { // version must be manually kept in sync with the one in root project settings.gradle.kts - implementation("gradle.plugin.com.github.johnrengelman", "shadow", "7.1.1") + implementation("gradle.plugin.com.github.johnrengelman", "shadow", "7.1.2") } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java index 34e18605..ce460685 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/SoundPackets1_13.java @@ -17,10 +17,8 @@ */ package com.viaversion.viabackwards.protocol.protocol1_12_2to1_13.packets; -import com.viaversion.viabackwards.ViaBackwards; import com.viaversion.viabackwards.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13; import com.viaversion.viabackwards.protocol.protocol1_12_2to1_13.data.NamedSoundMapping; -import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper; import com.viaversion.viaversion.api.rewriter.RewriterBase; import com.viaversion.viaversion.api.type.Type; @@ -39,14 +37,13 @@ public class SoundPackets1_13 extends RewriterBase { protocol.registerClientbound(ClientboundPackets1_13.NAMED_SOUND, new PacketRemapper() { @Override public void registerMap() { - map(Type.STRING); handler(wrapper -> { - String newSound = wrapper.get(Type.STRING, 0); - String oldSound = NamedSoundMapping.getOldId(newSound); - if (oldSound != null || (oldSound = protocol.getMappingData().getMappedNamedSound(newSound)) != null) { - wrapper.set(Type.STRING, 0, oldSound); - } else if (!Via.getConfig().isSuppressConversionWarnings()) { - ViaBackwards.getPlatform().getLogger().warning("Unknown named sound in 1.13->1.12 protocol: " + newSound); + String sound = wrapper.read(Type.STRING); + String mappedSound = NamedSoundMapping.getOldId(sound); + if (mappedSound != null || (mappedSound = protocol.getMappingData().getMappedNamedSound(sound)) != null) { + wrapper.write(Type.STRING, mappedSound); + } else { + wrapper.write(Type.STRING, sound); } }); } diff --git a/settings.gradle.kts b/settings.gradle.kts index f82b29d2..9d769932 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,7 +18,7 @@ dependencyResolutionManagement { pluginManagement { plugins { id("net.kyori.blossom") version "1.2.0" - id("com.github.johnrengelman.shadow") version "7.1.1" + id("com.github.johnrengelman.shadow") version "7.1.2" } }