From eb3d39a4d58a7200eda13065a81cfdd3695e9ba1 Mon Sep 17 00:00:00 2001 From: GoldenStack Date: Fri, 28 Oct 2022 21:03:24 -0500 Subject: [PATCH] Use the sound set's ID instead when possible --- src/main/java/anticope/rejects/modules/SoundLocator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/anticope/rejects/modules/SoundLocator.java b/src/main/java/anticope/rejects/modules/SoundLocator.java index 8973c78..8b68a4e 100644 --- a/src/main/java/anticope/rejects/modules/SoundLocator.java +++ b/src/main/java/anticope/rejects/modules/SoundLocator.java @@ -48,8 +48,10 @@ public class SoundLocator extends Module { private void printSound(SoundInstance sound) { WeightedSoundSet soundSet = mc.getSoundManager().get(sound.getId()); MutableText text; - if (soundSet == null || soundSet.getSubtitle() == null) { + if (soundSet == null) { text = Text.literal(sound.getId().toString()); + } else if (soundSet.getSubtitle() == null) { + text = Text.literal(soundSet.getId().toString()); } else { text = soundSet.getSubtitle().copy(); }