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.

Jongco0331

Members
  • Joined

  • Last visited

Everything posted by Jongco0331

  1. I'm trying to play sound formated ".wav". Original Minecraft is supporting only ".ogg" file. But, I have to need high-quility of sound. So, I'm trying this.
  2. I made new Thread to play sound using Clip class. But, when I give Thread#sleep to get fade In, Minecraft Client stops. How can I add new Runnable Thread in forge modding 1.19.2? public class AudioPlayUtil { public static boolean isPlaying = false; public static Clip clip; public static float volume = 1; public static void stopWav() { if(isPlaying) { isPlaying = false; clip.stop(); FloatControl control = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); control.setValue(control.getMinimum()); } } public static void playWav(float fadeInTime, File path) { if(isPlaying) { isPlaying = false; clip.stop(); FloatControl control = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); control.setValue(control.getMinimum()); } else { isPlaying = true; } new Thread(new Runnable() { @Override public void run() { try { AudioInputStream audioInputStream = AudioSystem.getAudioInputStream( path); clip = AudioSystem.getClip(); clip.open(audioInputStream); FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); float increasing_value = Math.abs(getCurrentVolume(gainControl, (float) ((int)AudioPlayUtil.volume * 100.0D)) / fadeInTime); clip.loop(Clip.LOOP_CONTINUOUSLY); gainControl.setValue(gainControl.getMinimum()); clip.start(); isPlaying = true; for(int i = 0; i < (int)fadeInTime; i++) { FloatControl control = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN) ; control.setValue(control.getValue() + increasing_value); Thread.sleep(50); } } catch(Exception e) { e.printStackTrace(); } } }).run(); } public static float getCurrentVolume(FloatControl floatControl, float volume) { float a = floatControl.getMaximum() - floatControl.getMinimum(); return Math.abs(a * (volume/100)); } }
  3. I just set gradlew. But, scala-compiler-2.11.1.jar, fastutil-7.1.0.jar are not installed. Error Log: * What went wrong: A problem occurred configuring root project 'one'. > Could not resolve all files for configuration ':_compileJava_1'. > Could not download scala-compiler.jar (org.scala-lang:scala-compiler:2.11.1) > Could not get resource 'https://maven.minecraftforge.net/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar'. > Premature end of Content-Length delimited message body (expected: 13449765; received: 8313560 > Could not download fastutil.jar (it.unimi.dsi:fastutil:7.1.0) > Could not get resource 'https://maven.minecraftforge.net/it/unimi/dsi/fastutil/7.1.0/fastutil-7.1.0.jar'. > Premature end of Content-Length delimited message body (expected: 17655579; received: 8843528
  4. I'm making anvil container on forge to interact with spigot plugin. But, spigot's InventoryClickEvent send null all info without ClickRawSlot. How can I get container's name and ItemStacks on spigot plugin?

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.