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.

Gedeon

Members
  • Joined

  • Last visited

Everything posted by Gedeon

  1. I'm running into what I'm sure is a pretty novice issue but I cannot find the help that I need in past posts. I've created a mod that I've tested well on my local mc instance. However, it fails to load (server crashes on load) when trying to use it in on a brand new forge 1.19.2-43.2.0 server with a friend. The pain point is clearly a SoundInstance, and the only sound I've added is a custom song that plays upon entry to the nether (works fine on local mc). FML: 43.2 Forge: net.minecraftforge:43.2.0[22:36:38] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [ First Mod (firstmod) has failed to load correctly ?7java.lang.RuntimeException: Attempted to load class net/minecraft/client/resources/sounds/SoundInstance for invalid dist DEDICATED_SERVER ] As I understand from similar issues by folks in the modding community, this is due to a client mod/feature on the dedicated server? However, I have MANY server-side features, such as custom blocks, weapons, structures, etc. Any help would be much appreciated, thanks.
  2. Thank you for the feedback. Is another event subscription needed (onTick or other) to periodically call the isActive method? Could you please elaborate some more on your recommendation for a current instance of SoundInstance? Does this tie into the current subscription I have to PlaySoundEvent or something else?
  3. As the title suggests, I am trying to set (in this case override) the ambient music in the Nether with a custom song but cannot get looping to work. I have registered the .ogg file, set up correct configurations for a streamed sound in sounds.json and ensured everything is hooked up within the main mod file for the custom SoundEvent to be recognized. Which of event.setSound and play.playSound is needed? Is there a simple flag to do this or is there a more appropriate method/approach? @Mod.EventBusSubscriber(modid = FirstMod.MOD_ID) public static class ForgeEvents { @SubscribeEvent public static void onPlaySound(PlaySoundEvent event) { if (Minecraft.getInstance().player != null) { if (Minecraft.getInstance().level != null) { if (Minecraft.getInstance().level.dimension() == Level.NETHER) { LocalPlayer player = Minecraft.getInstance().player; if (!isCustomSongPlaying) { isCustomSongPlaying = true; event.setSound(SimpleSoundInstance.forLocalAmbience(ModSounds.CUSTOM_SONG.get(), 1.0f, 1.0f)); player.playSound(ModSounds.CUSTOM_SONG.get(), 1.0f, 1.0f); } } else { isCustomSongPlaying = false; } } } } }

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.