2012-05-08 15:41:55 +02:00
|
|
|
package ee3.client;
|
2012-04-27 18:38:54 +02:00
|
|
|
|
2012-05-01 04:11:14 +02:00
|
|
|
import java.io.File;
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.net.URLClassLoader;
|
|
|
|
|
|
|
|
import net.minecraft.src.ModLoader;
|
2012-04-27 18:38:54 +02:00
|
|
|
import net.minecraft.src.SoundManager;
|
|
|
|
import net.minecraft.src.SoundPoolEntry;
|
2012-05-01 04:11:14 +02:00
|
|
|
import net.minecraft.src.mod_EE3;
|
2012-04-27 18:38:54 +02:00
|
|
|
import net.minecraft.src.forge.ISoundHandler;
|
|
|
|
|
|
|
|
public class SoundHandler implements ISoundHandler {
|
|
|
|
|
2012-05-01 04:13:32 +02:00
|
|
|
private String[] eeSoundFiles = {"ee/sound/break.ogg", "ee/sound/chargetick.ogg", "ee/sound/destruct.ogg",
|
|
|
|
"ee/sound/flash.ogg", "ee/sound/gust.ogg", "ee/sound/heal.ogg",
|
|
|
|
"ee/sound/kinesis.ogg", "ee/sound/launch.ogg", "ee/sound/nova.ogg",
|
|
|
|
"ee/sound/philball.ogg", "ee/sound/tock.ogg", "ee/sound/transmute.ogg",
|
|
|
|
"ee/sound/wall.ogg", "ee/sound/waterball.ogg", "ee/sound/wind.ogg"};
|
2012-05-01 04:11:14 +02:00
|
|
|
|
2012-04-27 18:38:54 +02:00
|
|
|
@Override
|
2012-05-08 02:50:42 +02:00
|
|
|
// Initializes our entries into the Sound Pool
|
2012-04-27 18:38:54 +02:00
|
|
|
public void onLoadSoundSettings(SoundManager soundManager) {
|
2012-05-01 04:11:14 +02:00
|
|
|
for (int i = 0; i < eeSoundFiles.length; i++)
|
|
|
|
soundManager.getSoundsPool().addSound(eeSoundFiles[i], this.getClass().getResource("/" + eeSoundFiles[i]));
|
2012-04-27 18:38:54 +02:00
|
|
|
}
|
|
|
|
|
2012-05-01 04:11:14 +02:00
|
|
|
@Override public void onSetupAudio(SoundManager soundManager) { }
|
|
|
|
@Override public SoundPoolEntry onPlayBackgroundMusic(SoundManager soundManager, SoundPoolEntry entry) { return entry; }
|
|
|
|
@Override public SoundPoolEntry onPlayStreaming(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z) { return entry; }
|
|
|
|
@Override public SoundPoolEntry onPlaySound(SoundManager soundManager, SoundPoolEntry entry, String soundName, float x, float y, float z, float volume, float pitch) { return entry; }
|
2012-05-01 13:13:36 +02:00
|
|
|
@Override public SoundPoolEntry onPlaySoundEffect(SoundManager soundManager, SoundPoolEntry entry, String soundName, float volume, float pitch) { return entry; }
|
2012-04-27 18:38:54 +02:00
|
|
|
|
|
|
|
}
|