From dbfdae63f1137ebe282d352adee822f2dfde90e5 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Sun, 20 Dec 2020 20:42:14 -0500 Subject: [PATCH] Add precautions to prevent stack traces on incomplete/unknown place sounds (#1717) --- .../java/world/JavaPlayBuiltinSoundTranslator.java | 8 ++++++-- .../network/translators/world/block/BlockTranslator.java | 6 +++++- connector/src/main/resources/mappings | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaPlayBuiltinSoundTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaPlayBuiltinSoundTranslator.java index d849c9179..1c057f45f 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaPlayBuiltinSoundTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaPlayBuiltinSoundTranslator.java @@ -34,8 +34,8 @@ import com.nukkitx.protocol.bedrock.packet.LevelSoundEventPacket; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.PacketTranslator; import org.geysermc.connector.network.translators.Translator; -import org.geysermc.connector.network.translators.world.block.BlockTranslator; import org.geysermc.connector.network.translators.sound.SoundRegistry; +import org.geysermc.connector.network.translators.world.block.BlockTranslator; @Translator(packet = ServerPlayBuiltinSoundPacket.class) public class JavaPlayBuiltinSoundTranslator extends PacketTranslator { @@ -82,7 +82,11 @@ public class JavaPlayBuiltinSoundTranslator extends PacketTranslator