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
public static SoundEvent SOUND_LEVELUP;

// Called from main class during FMLPreInitializationEvent
public static void registerSounds() {
	SOUND_LEVELUP = registerSound(new ResourceLocation(ModInfo.ID, "levelup"));
	// etc.
}
private static SoundEvent registerSound(ResourceLocation location) {
	final SoundEvent sound = new SoundEvent(location).setRegistryName(location);
	return GameRegistry.register(sound);
}

 

During the loading process just before the SoundSystem starts, I receive an error message like the following for every single sound listed in my sounds.json file:

File minecraft:sounds/special/levelup.ogg does not exist, cannot add it to event dynamicswordskills:levelup

Note how it appears to be searching for the file with the 'minecraft' domain rather than my mod id, even though it shows the correct resource location just after that.

 

I'm using Forge 1.9.4-12.17.0.1976.

 

What am I doing wrong?

The sound events in your sounds.json file have their resource domain set automatically from the file's resource domain, but the individual sound files used by the sound events don't, they need to be specified manually.

 

Replace special/levelup with dynamicswordskills:special/levelup in your sounds.json file.

Edited by Choonster
Fixed sound file path

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

Thanks!

 

I do find it a little odd that the modid needs to be specified in the sounds.json file now - are there any cases where one would want to specify something else? Because you can always fetch sounds from Minecraft or other mods using the registry.

Just now, coolAlias said:

Thanks!

 

I do find it a little odd that the modid needs to be specified in the sounds.json file now - are there any cases where one would want to specify something else? Because you can always fetch sounds from Minecraft or other mods using the registry.

 

It's possible that you'd want to create a sound event that consists of a combination of vanilla files not present in any existing sound event.

 

For example, a sound event consisting of minecraft:block/chorus_flower/grow1, minecraft:dig/cloth1 and youmod:foo/bar. There's no existing sound event with this combination of sound files.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.