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

What sound tutorial for 1.7.2 have you found best?

Long time Bukkit & Forge Programmer

Happy to try and help

I've found the vanilla json to be most useful: YourMod/eclipse/assets/sounds.json

 

Pretty much everything you need is right there, and you then you just play the sound with player.playSound, world.playSoundAtEntity, etc. :P The parameters for the sound-playing methods are all pretty well documented.

  • Author

Cool.  I'll follow that.  I've used build in sounds before, so should be simple.

 

In the tutorials I looked at they were based upon previous versions and several people had implimented sound handlers.  They didn't appear to be registering the handlers anywhere, so it looked just like simple classes.  Sometimes hard to tell when they are just describing the changes from 1.6.4 versus 1.7.2 and not how to actually go from scratch.

Long time Bukkit & Forge Programmer

Happy to try and help

In the tutorials I looked at they were based upon previous versions and several people had implimented sound handlers.

SoundHandlers are a thing of the past - they used to be used because sounds needed to be added to the sound pool during startup, but no longer. The SoundLoadedEvent really doesn't have a use anymore, as far as I can tell.

 

Personally, however, I still create a "Sounds" class filled with public static Strings for my sound file names, for ease of reference. Looks a bit like this:

public class Sounds {
// BLOCK SOUNDS
public static final String BREAK_JAR = ModInfo.ID + ":ceramic";
public static final String HIT_PEG = ModInfo.ID + ":hit_peg";
// etc.

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.