mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
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).
This commit is contained in:
1 parent
8180bed027
commit
68023ce40b
1 file changed
+9
-9
@@ -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())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user