From 68023ce40bd4c6bb9befc0862c99c2ea95122dec Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Mon, 4 Apr 2016 22:18:34 -0500 Subject: [PATCH] Fixed using PlaySoundEvent to replace a sound with a PositionedSound causing an NPE due to the Sound field not being set by a call to ISound.createAccessor(SoundHandler). --- .../client/audio/SoundManager.java.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch index c5d7b20ef..462f42c8c 100644 --- a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch @@ -16,16 +16,16 @@ } private synchronized void func_148608_i() -@@ -350,6 +352,9 @@ - } - else - { -+ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_); -+ if (p_148611_1_ == null) return; +@@ -338,6 +340,9 @@ + { + if (this.field_148617_f) + { ++ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_); ++ if (p_148611_1_ == null) return; + - if (!this.field_188777_o.isEmpty()) - { - for (ISoundEventListener isoundeventlistener : this.field_188777_o) + SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c); + ResourceLocation resourcelocation = p_148611_1_.func_147650_b(); + @@ -400,10 +405,12 @@ if (sound.func_188723_h()) {