2014-07-21 20:47:00 +02:00
|
|
|
package com.pahimar.ee3.client.util;
|
|
|
|
|
|
|
|
import com.pahimar.ee3.util.ResourceLocationHelper;
|
|
|
|
import cpw.mods.fml.client.FMLClientHandler;
|
|
|
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public class ClientSoundHelper {
|
|
|
|
public static void playSound(
|
|
|
|
String soundName,
|
|
|
|
float xCoord,
|
|
|
|
float yCoord,
|
|
|
|
float zCoord,
|
|
|
|
float volume,
|
|
|
|
float pitch
|
|
|
|
) {
|
|
|
|
FMLClientHandler.instance().getClient().getSoundHandler().playSound(
|
|
|
|
new PositionedSoundRecord(
|
|
|
|
ResourceLocationHelper.getResourceLocation(soundName),
|
|
|
|
volume,
|
|
|
|
pitch,
|
|
|
|
xCoord,
|
|
|
|
yCoord,
|
|
|
|
zCoord
|
|
|
|
)
|
|
|
|
);
|
2014-07-21 20:47:00 +02:00
|
|
|
}
|
|
|
|
}
|