@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); } } }
@SideOnly(Side.CLIENT) public AttenuationType getAttenuation();
@Override @SideOnly(Side.CLIENT) public AttenuationType getAttenuation() { return AttenuationType.LINEAR; }