Use the sound set's ID instead when possible

This commit is contained in:
GoldenStack
2022-10-28 21:03:24 -05:00
parent 4cb0bca604
commit eb3d39a4d5

View File

@@ -48,8 +48,10 @@ public class SoundLocator extends Module {
private void printSound(SoundInstance sound) { private void printSound(SoundInstance sound) {
WeightedSoundSet soundSet = mc.getSoundManager().get(sound.getId()); WeightedSoundSet soundSet = mc.getSoundManager().get(sound.getId());
MutableText text; MutableText text;
if (soundSet == null || soundSet.getSubtitle() == null) { if (soundSet == null) {
text = Text.literal(sound.getId().toString()); text = Text.literal(sound.getId().toString());
} else if (soundSet.getSubtitle() == null) {
text = Text.literal(soundSet.getId().toString());
} else { } else {
text = soundSet.getSubtitle().copy(); text = soundSet.getSubtitle().copy();
} }