Package net.minecraft.src

Examples of net.minecraft.src.SoundManager


  private boolean play() {
    if (song.exists()) {
      if (notify) {
        SpoutClient.getInstance().getActivePlayer().showAchievement("Download Complete!", song.getName(), 2256); // Gold Record
      }
      SoundManager sndManager = SpoutClient.getHandle().sndManager;
      if (!sndManager.hasSoundEffect(song.getName().toString(), 0) && soundEffect) {
        sndManager.addCustomSoundEffect(song.getName().toString(), song);
      }
      if (!sndManager.hasMusic(song.getName().toString(), 0) && !soundEffect) {
        sndManager.addCustomMusic(song.getName().toString(), song);
      }
      if (!soundEffect) {
        sndManager.playMusic(song.getName().toString(), 0, x, y, z, volume / 100F, distance);
      } else {
        sndManager.playCustomSoundEffect(song.getName().toString(), x, y, z, volume / 100F, distance);
      }
      return true;
    }
    return false;
  }
View Full Code Here


  }

  public void run(int entityId) {
    EntityPlayer e = SpoutClient.getInstance().getPlayerFromId(entityId);
    if (e != null) {
        SoundManager sndManager = SpoutClient.getHandle().sndManager;
        if (soundId > -1 && soundId <= SoundEffect.getMaxId()) {
          SoundEffect effect = SoundEffect.getSoundEffectFromId(soundId);
          if (!location) {
            sndManager.playSoundFX(effect.getName(), 0.5F, 0.7F, effect.getVariationId(), volume / 100F);
          } else {
            sndManager.playSound(effect.getName(), x, y, z, 0.5F, (distance / 16F), effect.getVariationId(), volume / 100F);
          }
        }
        soundId -= (1 + SoundEffect.getMaxId());
        if (soundId > -1 && soundId <= Music.getMaxId()) {
          Music music = Music.getMusicFromId(soundId);
          sndManager.playMusic(music.getName(), music.getSoundId(), volume / 100F);
        }
    }
  }
View Full Code Here

        leftClickCounter = 0;
        guiAchievement = new GuiAchievement(this);
        skipRenderWorld = false;
        playerModelBiped = new ModelBiped(0.0F);
        objectMouseOver = null;
        sndManager = new SoundManager();
        rightClickDelayTimer = 0;
        textureWaterFX = new TextureWaterFX();
        textureLavaFX = new TextureLavaFX();
        running = true;
        debug = "";
View Full Code Here

     * Forces a reload of the sound manager and all the resources. Called in game by holding 'F3' and pressing 'S'.
     */
    private void forceReload()
    {
        System.out.println("FORCING RELOAD!");
        sndManager = new SoundManager();
        sndManager.loadSoundSettings(gameSettings);
        downloadResourcesThread.reloadResources();
    }
View Full Code Here

TOP

Related Classes of net.minecraft.src.SoundManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.