Hey guys, I have a problem playing custom sounds. I follow VSWEs tutorials on youtube.
When I call
Minecraft.getMinecraft().sndManager.playSound("example:wand", (float)x, (float)y, (float)z, volume, pitch);
the SoundSystem-thread throws a NullPointerException.
I register the sound in this class
@SideOnly(Side.CLIENT)
public class SoundHandler {
@ForgeSubscribe
public void onSoundsLoad(SoundLoadEvent event) {
event.manager.soundPoolSounds.addSound("example:wand.ogg");
}
}
the file is in assets/example/sound/wand.ogg
and I register my SoundHandler in my proxy on the client side only.
MinecraftForge.EVENT_BUS.register(new SoundHandler());
this is the full errormessage
2014-01-19 21:49:02 [information] [sTDERR] Exception in thread "Thread-7" java.lang.NullPointerException
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.codecs.CodecJOrbis.readHeader(CodecJOrbis.java:448)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.codecs.CodecJOrbis.initialize(CodecJOrbis.java:301)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.libraries.LibraryLWJGLOpenAL.loadSound(LibraryLWJGLOpenAL.java:392)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.libraries.LibraryLWJGLOpenAL.newSource(LibraryLWJGLOpenAL.java:640)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.SoundSystem.CommandNewSource(SoundSystem.java:1800)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2415)
2014-01-19 21:49:02 [information] [sTDERR] at paulscode.sound.CommandThread.run(CommandThread.java:121)
I hope you guys can help me