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

So back in 1.6 to register a sound you had to do:

event.manager.addSound(String);

But now addSound doesnt seem to exist and i cannot, for the life of me, figure what replaced it. could anyone help me out here? Also i noticed @ForgeSubscribe is no longer an annotation and again, im lost as to what replaced it, im guessing it was maybe @EventHandler, but i do not know for sure.

 

Thank you in advanced :)

In 1.7.2, you don't add sounds or register them, you use a sounds.json file located next to your 'sounds' folder in your assets directory.

 

It should look something like this:

 

{
    "swordstrike": {"category": "player","sounds": ["sword/swordstrike1","sword/swordstrike2","sword/swordstrike3","sword/swordstrike4"]},
    "master_sword": {"category": "ambient","sounds":["special/master_sword"]}
}

 

The first " " is the String you will use to refer to your sound in the mod, so when you play the sound, it would be "yourmodid:sound_name".

 

The category "player", "ambient", etc., is the volume control option that affects the volume of your sound in game.

 

You can place your sounds in subdirectories like I did ("sword", "special", etc.), or just have them all in the base sounds directory.

  • Author

ok, that worked! thank you so much, AND one of the sounds that i wasnt able to get working right in 1.6 is now working! :D

Guest
This topic is now closed to further replies.

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.