use of net.minecraft.client.entity.EntityClientPlayerMP in project RFTools by McJty.
the class VolcanicCoreTileEntity method playRumble.
@SideOnly(Side.CLIENT)
private void playRumble() {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
sound = new VolcanicRumbleSound(player, worldObj, xCoord, yCoord, zCoord);
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
// RFTools.log("++++ Start rumble at " + xCoord + "," + yCoord + "," + zCoord);
}
use of net.minecraft.client.entity.EntityClientPlayerMP in project Hbm-s-Nuclear-Tech-GIT by HbmMods.
the class SoundLoopBroadcaster method update.
@Override
public void update() {
super.update();
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
float f = 0;
if (player != null) {
f = (float) Math.sqrt(Math.pow(xPosF - player.posX, 2) + Math.pow(yPosF - player.posY, 2) + Math.pow(zPosF - player.posZ, 2));
volume = func(f, intendedVolume);
if (!(player.worldObj.getTileEntity((int) xPosF, (int) yPosF, (int) zPosF) instanceof TileEntityBroadcaster)) {
this.donePlaying = true;
volume = 0;
}
} else {
volume = intendedVolume;
}
}
use of net.minecraft.client.entity.EntityClientPlayerMP in project Hbm-s-Nuclear-Tech-GIT by HbmMods.
the class SoundLoopSiren method update.
@Override
public void update() {
super.update();
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
float f = 0;
if (player != null) {
f = (float) Math.sqrt(Math.pow(xPosF - player.posX, 2) + Math.pow(yPosF - player.posY, 2) + Math.pow(zPosF - player.posZ, 2));
volume = func(f, intendedVolume);
} else {
volume = intendedVolume;
}
if (te instanceof TileEntityMachineSiren) {
this.setRepeat(type.name().equals(SoundType.LOOP.name()));
} else {
this.donePlaying = true;
}
}
use of net.minecraft.client.entity.EntityClientPlayerMP in project Hbm-s-Nuclear-Tech-GIT by HbmMods.
the class AudioDynamic method update.
@Override
public void update() {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
float f = 0;
if (player != null) {
f = (float) Math.sqrt(Math.pow(xPosF - player.posX, 2) + Math.pow(yPosF - player.posY, 2) + Math.pow(zPosF - player.posZ, 2));
volume = func(f, intendedVolume);
} else {
volume = intendedVolume;
}
}
Aggregations