Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi, its DealerJoe again!

 

Okay, my problem are sounds this time. So, if I want to register a sound, I have to put the register-Method into the @PreInit-Method :

 

@PreInit
public void loadConfiguration(FMLPreInitializationEvent evt) {

	/** LOAD SOUNDS **/

	MinecraftForge.EVENT_BUS.register(new SoundEvent());
}

 

just like this. But now my Question, I have to put a @SideOnly annotation somewhere, otherwise the server crashes :

 

2012-10-21 14:29:43 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.1.35.394 for Minecraft client:1.3.2, server:1.3.2 loading
2012-10-21 14:29:44 [iNFO] [sTDOUT] 195 recipes
2012-10-21 14:29:44 [iNFO] [sTDOUT] 27 achievements
2012-10-21 14:29:45 [iNFO] [sTDERR] 2012-10-21 14:29:45 [iNFO] Starting minecraft server version 1.3.2
2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2012-10-21 14:29:45 [iNFO] [sTDOUT] MinecraftForge v4.2.5.303 Initialized
2012-10-21 14:29:45 [iNFO] [ForgeModLoader] MinecraftForge v4.2.5.303 Initialized
2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization
2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Searching C:\Users\Toshiba\Desktop\Forge Modding\FarmersFriends\jars\mods for mods
2012-10-21 14:29:46 [iNFO] [ForgeModLoader] Attempting to reparse the mod container bin
2012-10-21 14:29:47 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 3 mods to load
2012-10-21 14:29:47 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Loading properties
2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Default game type: SURVIVAL
2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Generating keypair
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Starting Minecraft server on *:25565
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] The server will make no attempt to authenticate usernames. Beware.
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] To change this, set "online-mode" to "true" in the server.properties file.
2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 3 mods
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Preparing level "mcpworld"
2012-10-21 14:29:48 [iNFO] [ForgeModLoader] This world was saved with mod FarmersFriends version 1.0 and it is now at version 1.1, things may not work well
2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension 0 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6)
2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension 1 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6)
2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension -1 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6)
2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Preparing start region for level 0
2012-10-21 14:29:49 [iNFO] [sTDERR] 2012-10-21 14:29:49 [iNFO] Preparing spawn area: 52%
2012-10-21 14:29:50 [iNFO] [sTDERR] 2012-10-21 14:29:50 [iNFO] Done (2,137s)! For help, type "help" or "?"
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Stopping the server
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Stopping server
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving players
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.DualStackPlainSocketImpl.accept0(Native Method)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.PlainSocketImpl.accept(Unknown Source)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.ServerSocket.implAccept(Unknown Source)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at java.net.ServerSocket.accept(Unknown Source)
2012-10-21 14:30:28 [iNFO] [sTDERR] 	at net.minecraft.src.ServerListenThread.run(ServerListenThread.java:75)
2012-10-21 14:30:28 [iNFO] [sTDOUT] Closing listening thread
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving worlds
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/Overworld
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/Nether
2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/The End
2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension 0
2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension -1
2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension 1

 

But where do I have to put it ?

 

 

Hope you can help me

 

DealerJoe

The sound event only exists on the client.

 

THIS

MinecraftForge.EVENT_BUS.register(new SoundEvent());,

Should be in your client proxy.

  • Author

Yeah, this was my first Idea too, but when I then try to play the sound, I hear nothing.

 

registering the sound :

 

event.manager.soundPoolSounds.addSound("sound/chopper.wav", mod_farmersfriends.class.getResource("/farmer/sound/chopper.wav"));            

 

Trying to play it :

 

par1World.playSoundEffect(par2, par3, par4, "sound.chopper", 1F, 1F);

 

Thank you anyway.

 

DealerJoe

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.