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.

____tbvns____

Members
  • Joined

  • Last visited

  1. For some reason, this code doesn't work: public void GameStart() { System.out.println("Checking for server"); //(1) if (Value.server != null && Value.server.isRunning()) { System.out.println("Playing Sound"); //(2) Value.server.getPlayerList().getPlayers().forEach(p ->{ double x = p.getX(); double y = p.getY(); double z = p.getZ(); p.getLevel().playSound(p.getInventory().player, x, y, z, LoadSounds.GAME_START.get(), SoundSource.PLAYERS, 100f, 100f); }); } } Both System.out.print are executed, but no sound is played. I can play the sound using /playsound, so I don't think it is caused by a typo in the all the JSON file or in the name of those files. Here are aditional file that may be needed: LoadSound.class: public class LoadSounds { public static final DeferredRegister<SoundEvent> SOUND_EVENT = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, FlagsHunters.MODID); //Load Sound public static final RegistryObject<SoundEvent> GAME_START = soundEventRegistryObject("game_start"); //Random Stuff private static RegistryObject<SoundEvent> soundEventRegistryObject(String name) { ResourceLocation id = new ResourceLocation(FlagsHunters.MODID, name); return SOUND_EVENT.register(name, () -> new SoundEvent(id)); } //Load function public static void Load(IEventBus eventBus) { SOUND_EVENT.register(eventBus); } } sounds.json: { "game_start": { "subtitle": "flagshunters.subtitle.game_start", "sounds": [ "flagshunters:game_start" ] } } all the file and folder: The minecraft version: 1.19.2 The forge version: 43.2.21

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.