Merge pull request #2708 from Zaggy1024/1.9
Fix PlaySoundEvent replacing a sound with PositionedSound causing an NPE.
This commit is contained in:
commit
25d7b80119
1 changed files with 9 additions and 9 deletions
|
@ -16,16 +16,16 @@
|
|||
}
|
||||
|
||||
private synchronized void func_148608_i()
|
||||
@@ -350,6 +352,9 @@
|
||||
}
|
||||
else
|
||||
@@ -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())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue