Java 类net.minecraft.client.audio.ISound.AttenuationType 实例源码

项目:enderutilities    文件:ClientProxy.java   
@Override
public void playSound(int soundId, float pitch, float volume, boolean repeat, boolean stop, float x, float y, float z)
{
    SoundHandler soundHandler = Minecraft.getMinecraft().getSoundHandler();
    SoundEvent sound = SoundEvent.REGISTRY.getObjectById(soundId);

    if (sound != null)
    {
        if (stop)
        {
            soundHandler.stop(sound.getRegistryName().toString(), null);
        }
        else
        {
            PositionedSoundRecord positionedSound = new PositionedSoundRecord(sound.getSoundName(),
                    SoundCategory.RECORDS, volume, pitch, repeat, 0, AttenuationType.LINEAR, x, y, z);
            soundHandler.playSound(positionedSound);
        }
    }
}
项目:vsminecraft    文件:ISoundSource.java   
@SideOnly(Side.CLIENT)
public AttenuationType getAttenuation();
项目:vsminecraft    文件:TileEntityNoisyElectricBlock.java   
@Override
@SideOnly(Side.CLIENT)
public AttenuationType getAttenuation()
{
    return AttenuationType.LINEAR;
}
项目:vsminecraft    文件:TileEntityReactorController.java   
@Override
@SideOnly(Side.CLIENT)
public AttenuationType getAttenuation()
{
    return AttenuationType.LINEAR;
}