mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
45 lines
800 B
Java
45 lines
800 B
Java
package com.hbm.sound;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class AudioWrapperClient extends AudioWrapper {
|
|
|
|
AudioDynamic sound;
|
|
|
|
public AudioWrapperClient(ResourceLocation source) {
|
|
sound = new AudioDynamic(source);
|
|
}
|
|
|
|
public void updatePosition(float x, float y, float z) {
|
|
sound.setPosition(x, y, z);
|
|
}
|
|
|
|
public void updateVolume(float volume) {
|
|
sound.setVolume(volume);
|
|
}
|
|
|
|
public void updatePitch(float pitch) {
|
|
sound.setPitch(pitch);
|
|
}
|
|
|
|
public float getVolume() {
|
|
return sound.getVolume();
|
|
}
|
|
|
|
public float getPitch() {
|
|
return sound.getPitch();
|
|
}
|
|
|
|
public void startSound() {
|
|
sound.start();
|
|
}
|
|
|
|
public void stopSound() {
|
|
sound.stop();
|
|
}
|
|
|
|
}
|