Posted March 8, 201312 yr I am trying to make a custom sound when someone right clicks on my block. Does anyone now a good forge sound tut?
March 8, 201312 yr [lmgtfy=forge sounds minecraft tutorial]Here you go...[/lmgtfy] If you guys dont get it.. then well ya.. try harder...
March 8, 201312 yr Author I tried that here is my code. EventSounds package orangelight.periodiccraft.common; import net.minecraftforge.client.event.sound.SoundLoadEvent; import net.minecraftforge.event.ForgeSubscribe; public class Orangelight_EventSounds { public class YourMod_EventSounds { @ForgeSubscribe public void onSound(SoundLoadEvent event) { try { event.manager.soundPoolSounds.addSound("flute.ogg", PeriodicCraft.class.getResource("/orangelight/periodiccraft/art/")); } catch (Exception e) { System.err.println("Failed to register one or more sounds."); } } } } Put this where i want it to play my sound world.playSoundEffect(0, 0, 0, "fluteC.ogg", 3.0F, 3.0F);
March 8, 201312 yr Author when I start it up i get this error 2013-03-08 15:50:42 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-03-08 15:50:42 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2013-03-08 15:50:42 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-03-08 15:50:43 [iNFO] [sTDOUT] Error in class 'LibraryLWJGLOpenAL' 2013-03-08 15:50:43 [iNFO] [sTDOUT] Unable to initialize OpenAL. Probable cause: OpenAL not supported. 2013-03-08 15:50:43 [iNFO] [sTDOUT] ERROR MESSAGE: 2013-03-08 15:50:43 [iNFO] [sTDOUT] Could not locate OpenAL library. 2013-03-08 15:50:43 [iNFO] [sTDOUT] STACK TRACE: 2013-03-08 15:50:43 [iNFO] [sTDOUT] org.lwjgl.openal.AL.create(AL.java:153) 2013-03-08 15:50:43 [iNFO] [sTDOUT] org.lwjgl.openal.AL.create(AL.java:104) 2013-03-08 15:50:43 [iNFO] [sTDOUT] org.lwjgl.openal.AL.create(AL.java:191) 2013-03-08 15:50:43 [iNFO] [sTDOUT] paulscode.sound.libraries.LibraryLWJGLOpenAL.init(SourceFile:164) 2013-03-08 15:50:43 [iNFO] [sTDOUT] paulscode.sound.SoundSystem.CommandNewLibrary(SourceFile:1576) 2013-03-08 15:50:43 [iNFO] [sTDOUT] paulscode.sound.SoundSystem.CommandQueue(SourceFile:2572) 2013-03-08 15:50:43 [iNFO] [sTDOUT] paulscode.sound.CommandThread.run(SourceFile:121) 2013-03-08 15:50:43 [iNFO] [sTDOUT] ERROR MESSAGE: 2013-03-08 15:50:43 [iNFO] [sTDOUT] Could not locate OpenAL library. 2013-03-08 15:50:43 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-03-08 15:50:44 [iNFO] [sTDOUT] Switching to No Sound 2013-03-08 15:50:44 [iNFO] [sTDOUT] (Silent Mode)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.