Search in sources :

Example 1 with MovingSound

use of net.minecraft.client.audio.MovingSound in project RFTools by McJty.

the class ElevatorSounds method stopSound.

public static void stopSound(World worldObj, BlockPos pos) {
    GlobalCoordinate g = new GlobalCoordinate(pos, worldObj.provider.getDimension());
    if (sounds.containsKey(g)) {
        MovingSound movingSound = sounds.get(g);
        Minecraft.getMinecraft().getSoundHandler().stopSound(movingSound);
        sounds.remove(g);
    }
}
Also used : GlobalCoordinate(mcjty.lib.varia.GlobalCoordinate) MovingSound(net.minecraft.client.audio.MovingSound)

Example 2 with MovingSound

use of net.minecraft.client.audio.MovingSound in project RFTools by McJty.

the class ElevatorSounds method playStartup.

public static void playStartup(World worldObj, BlockPos pos) {
    MovingSound sound = new ElevatorStartupSound(worldObj, pos.getX(), pos.getY(), pos.getZ());
    playSound(worldObj, pos, sound);
}
Also used : MovingSound(net.minecraft.client.audio.MovingSound)

Example 3 with MovingSound

use of net.minecraft.client.audio.MovingSound in project RFTools by McJty.

the class ElevatorSounds method isStopPlaying.

public static boolean isStopPlaying(World worldObj, BlockPos pos) {
    GlobalCoordinate g = new GlobalCoordinate(pos, worldObj.provider.getDimension());
    MovingSound movingSound = sounds.get(g);
    return movingSound instanceof ElevatorStopSound;
}
Also used : GlobalCoordinate(mcjty.lib.varia.GlobalCoordinate) MovingSound(net.minecraft.client.audio.MovingSound)

Example 4 with MovingSound

use of net.minecraft.client.audio.MovingSound in project RFTools by McJty.

the class ElevatorSounds method playStop.

public static void playStop(World worldObj, BlockPos pos) {
    MovingSound sound = new ElevatorStopSound(worldObj, pos.getX(), pos.getY(), pos.getZ());
    playSound(worldObj, pos, sound);
}
Also used : MovingSound(net.minecraft.client.audio.MovingSound)

Example 5 with MovingSound

use of net.minecraft.client.audio.MovingSound in project RFTools by McJty.

the class ElevatorSounds method isStartupPlaying.

public static boolean isStartupPlaying(World worldObj, BlockPos pos) {
    GlobalCoordinate g = new GlobalCoordinate(pos, worldObj.provider.getDimension());
    MovingSound movingSound = sounds.get(g);
    return movingSound instanceof ElevatorStartupSound;
}
Also used : GlobalCoordinate(mcjty.lib.varia.GlobalCoordinate) MovingSound(net.minecraft.client.audio.MovingSound)

Aggregations

MovingSound (net.minecraft.client.audio.MovingSound)9 GlobalCoordinate (mcjty.lib.varia.GlobalCoordinate)4