From 2e0e9b92050c42ffd9f9dd4cd3226b9bc02411eb Mon Sep 17 00:00:00 2001 From: Adrenix <15348635+Adrenix@users.noreply.github.com> Date: Mon, 12 Jun 2023 13:17:51 -0400 Subject: [PATCH] Fixes (#38) null sound event crash --- .../nostalgic/mixin/client/world/ClientLevelMixin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/mod/adrenix/nostalgic/mixin/client/world/ClientLevelMixin.java b/common/src/main/java/mod/adrenix/nostalgic/mixin/client/world/ClientLevelMixin.java index fe41c8804..51df83a85 100644 --- a/common/src/main/java/mod/adrenix/nostalgic/mixin/client/world/ClientLevelMixin.java +++ b/common/src/main/java/mod/adrenix/nostalgic/mixin/client/world/ClientLevelMixin.java @@ -216,6 +216,10 @@ public abstract class ClientLevelMixin ) private void NT$onPlayPositionedSound(Player player, double x, double y, double z, SoundEvent sound, SoundSource category, float volume, float pitch, CallbackInfo callback) { + // This shouldn't be null, but returning here prevents crash reports that point to this mod to being at fault + if (sound == null) + return; + /* Attack Sounds */ boolean isAttack = sound == SoundEvents.PLAYER_ATTACK_KNOCKBACK ||