Java 类net.minecraft.client.audio.SoundPoolEntry 实例源码

项目:RuneCraftery    文件:SoundManager.java   
public void func_77371_c() {
   if(this.field_77376_g && this.field_77375_f.field_74342_a != 0.0F) {
      if(!this.field_77381_a.playing("BgMusic") && !this.field_77381_a.playing("streaming")) {
         if(this.field_77383_i > 0) {
            --this.field_77383_i;
         } else {
            SoundPoolEntry var1 = this.field_77377_d.func_77460_a();
            if(var1 != null) {
               this.field_77383_i = this.field_77382_h.nextInt(12000) + 12000;
               this.field_77381_a.backgroundMusic("BgMusic", var1.func_110457_b(), var1.func_110458_a(), false);
               this.field_77381_a.setVolume("BgMusic", this.field_77375_f.field_74342_a);
               this.field_77381_a.play("BgMusic");
            }

         }
      }
   }
}
项目:RuneCraftery    文件:SoundManager.java   
public void func_77368_a(String p_77368_1_, float p_77368_2_, float p_77368_3_, float p_77368_4_) {
   if(this.field_77376_g && (this.field_77375_f.field_74340_b != 0.0F || p_77368_1_ == null)) {
      String var5 = "streaming";
      if(this.field_77381_a.playing(var5)) {
         this.field_77381_a.stop(var5);
      }

      if(p_77368_1_ != null) {
         SoundPoolEntry var6 = this.field_77380_c.func_77458_a(p_77368_1_);
         if(var6 != null) {
            if(this.field_77381_a.playing("BgMusic")) {
               this.field_77381_a.stop("BgMusic");
            }

            this.field_77381_a.newStreamingSource(true, var5, var6.func_110457_b(), var6.func_110458_a(), false, p_77368_2_, p_77368_3_, p_77368_4_, 2, 64.0F);
            this.field_77381_a.setVolume(var5, 0.5F * this.field_77375_f.field_74340_b);
            this.field_77381_a.play(var5);
         }

      }
   }
}
项目:RuneCraftery    文件:SoundManager.java   
public void func_77364_b(String p_77364_1_, float p_77364_2_, float p_77364_3_, float p_77364_4_, float p_77364_5_, float p_77364_6_) {
   if(this.field_77376_g && this.field_77375_f.field_74340_b != 0.0F) {
      SoundPoolEntry var7 = this.field_77379_b.func_77458_a(p_77364_1_);
      if(var7 != null && p_77364_5_ > 0.0F) {
         this.field_77378_e = (this.field_77378_e + 1) % 256;
         String var8 = "sound_" + this.field_77378_e;
         float var9 = 16.0F;
         if(p_77364_5_ > 1.0F) {
            var9 *= p_77364_5_;
         }

         this.field_77381_a.newSource(p_77364_5_ > 1.0F, var8, var7.func_110457_b(), var7.func_110458_a(), false, p_77364_2_, p_77364_3_, p_77364_4_, 2, var9);
         if(p_77364_5_ > 1.0F) {
            p_77364_5_ = 1.0F;
         }

         this.field_77381_a.setPitch(var8, p_77364_6_);
         this.field_77381_a.setVolume(var8, p_77364_5_ * this.field_77375_f.field_74340_b);
         this.field_77381_a.play(var8);
      }

   }
}
项目:RuneCraftery    文件:SoundManager.java   
public void func_77366_a(String p_77366_1_, float p_77366_2_, float p_77366_3_) {
   if(this.field_77376_g && this.field_77375_f.field_74340_b != 0.0F) {
      SoundPoolEntry var4 = this.field_77379_b.func_77458_a(p_77366_1_);
      if(var4 != null && p_77366_2_ > 0.0F) {
         this.field_77378_e = (this.field_77378_e + 1) % 256;
         String var5 = "sound_" + this.field_77378_e;
         this.field_77381_a.newSource(false, var5, var4.func_110457_b(), var4.func_110458_a(), false, 0.0F, 0.0F, 0.0F, 0, 0.0F);
         if(p_77366_2_ > 1.0F) {
            p_77366_2_ = 1.0F;
         }

         p_77366_2_ *= 0.25F;
         this.field_77381_a.setPitch(var5, p_77366_3_);
         this.field_77381_a.setVolume(var5, p_77366_2_ * this.field_77375_f.field_74340_b);
         this.field_77381_a.play(var5);
      }

   }
}
项目:RuneCraftery    文件:SoundPool.java   
public void func_77459_a(String p_77459_1_) {
   try {
      String var2 = p_77459_1_;
      p_77459_1_ = p_77459_1_.substring(0, p_77459_1_.indexOf("."));
      if(this.field_77463_b) {
         while(Character.isDigit(p_77459_1_.charAt(p_77459_1_.length() - 1))) {
            p_77459_1_ = p_77459_1_.substring(0, p_77459_1_.length() - 1);
         }
      }

      p_77459_1_ = p_77459_1_.replaceAll("/", ".");
      Object var3 = (List)this.field_77461_d.get(p_77459_1_);
      if(var3 == null) {
         var3 = Lists.newArrayList();
         this.field_77461_d.put(p_77459_1_, var3);
      }

      ((List)var3).add(new SoundPoolEntry(var2, this.func_110654_c(var2)));
   } catch (MalformedURLException var4) {
      var4.printStackTrace();
      throw new RuntimeException(var4);
   }
}
项目:TRHS_Club_Mod_2016    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:TRHS_Club_Mod_2016    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    super(manager);
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:TRHS_Club_Mod_2016    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:CauldronGit    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:CauldronGit    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    super(manager);
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:CauldronGit    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    super(manager);
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:Cauldron    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    super(manager);
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:Cauldron    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:Cauldron    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    super(manager);
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:Cauldron    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:RuneCraftery    文件:SoundManager.java   
public void func_82467_a(String p_82467_1_, Entity p_82467_2_, float p_82467_3_, float p_82467_4_, boolean p_82467_5_) {
   if(this.field_77376_g && (this.field_77375_f.field_74340_b != 0.0F || p_82467_1_ == null) && p_82467_2_ != null) {
      String var6 = "entity_" + p_82467_2_.field_70157_k;
      if(this.field_82470_g.contains(var6)) {
         this.func_82460_a(p_82467_2_);
      } else {
         if(this.field_77381_a.playing(var6)) {
            this.field_77381_a.stop(var6);
         }

         if(p_82467_1_ != null) {
            SoundPoolEntry var7 = this.field_77379_b.func_77458_a(p_82467_1_);
            if(var7 != null && p_82467_3_ > 0.0F) {
               float var8 = 16.0F;
               if(p_82467_3_ > 1.0F) {
                  var8 *= p_82467_3_;
               }

               this.field_77381_a.newSource(p_82467_5_, var6, var7.func_110457_b(), var7.func_110458_a(), false, (float)p_82467_2_.field_70165_t, (float)p_82467_2_.field_70163_u, (float)p_82467_2_.field_70161_v, 2, var8);
               this.field_77381_a.setLooping(var6, true);
               this.field_77381_a.setPitch(var6, p_82467_4_);
               if(p_82467_3_ > 1.0F) {
                  p_82467_3_ = 1.0F;
               }

               this.field_77381_a.setVolume(var6, p_82467_3_ * this.field_77375_f.field_74340_b);
               this.field_77381_a.setVelocity(var6, (float)p_82467_2_.field_70159_w, (float)p_82467_2_.field_70181_x, (float)p_82467_2_.field_70179_y);
               this.field_77381_a.play(var6);
               this.field_82470_g.add(var6);
            }

         }
      }
   }
}
项目:RuneCraftery    文件:SoundPool.java   
public SoundPoolEntry func_77460_a() {
   if(this.field_77461_d.isEmpty()) {
      return null;
   } else {
      ArrayList var1 = Lists.newArrayList(this.field_77461_d.keySet());
      return this.func_77458_a((String)var1.get(this.field_77464_c.nextInt(var1.size())));
   }
}
项目:RuneCraftery    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:RuneCraftery    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:RuneCraftery    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:RuneCraftery    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:RuneCraftery    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:RuneCraftery    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:BetterNutritionMod    文件:PlaySoundEvent.java   
public PlaySoundEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z, float volume, float pitch)
{ 
    super(manager, source, name, volume, pitch);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:BetterNutritionMod    文件:SoundResultEvent.java   
public SoundResultEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{
    this.manager = manager;
    this.source = source;
    this.name = name;
    this.volume = volume;
    this.pitch = pitch;
    this.result = source;
}
项目:BetterNutritionMod    文件:PlayStreamingEvent.java   
public PlayStreamingEvent(SoundManager manager, SoundPoolEntry source, String name, float x, float y, float z)
{ 
    super(manager, source, name, 0.0f, 0.0f);
    this.x = x;
    this.y = y;
    this.z = z;
}
项目:EnergyFromMatter    文件:CustomSoundManager.java   
/**
 * Plays a sound. Args: soundName, x, y, z, volume, pitch, fadeOutTime
 */
public static String playSound(String par1Str, float par2, float par3,
        float par4, float par5, float par6)
{
    SoundPoolEntry soundpoolentry = sndManager.soundPoolSounds
            .getRandomSoundFromSoundPool(par1Str);
    soundpoolentry = SoundEvent.getResult(new PlaySoundEvent(sndManager,
            soundpoolentry, par1Str, par2, par3, par4, par5, par6));

    if (soundpoolentry != null && par5 > 0.0F)
    {
        latestSoundID = 256 + ((latestSoundID + 1) % 256);
        String s1 = "sound_" + latestSoundID;
        float f5 = 16.0F;

        if (par5 > 1.0F)
        {
            f5 *= par5;
        }

        sndManager.sndSystem.newSource(par5 > 1.0F, s1,
                soundpoolentry.getSoundUrl(),
                soundpoolentry.getSoundName(), false, par2, par3, par4, 2,
                f5);

        if (par5 > 1.0F)
        {
            par5 = 1.0F;
        }

        sndManager.sndSystem.setPitch(s1, par6);
        sndManager.sndSystem.setVolume(s1, par5
                * Minecraft.getMinecraft().gameSettings.soundVolume);
        MinecraftForge.EVENT_BUS.post(new PlaySoundSourceEvent(sndManager,
                s1, par2, par3, par4));
        sndManager.sndSystem.play(s1);
        return s1;
    }
    return null;
}
项目:TRHS_Club_Mod_2016    文件:SoundEvent.java   
@Deprecated
public static SoundPoolEntry getResult(SoundResultEvent event)
{
    MinecraftForge.EVENT_BUS.post(event);
    return event.result;
}
项目:TRHS_Club_Mod_2016    文件:PlayBackgroundMusicEvent.java   
public PlayBackgroundMusicEvent(SoundManager manager, SoundPoolEntry entry)
{ super(manager, entry, null, 0.0f, 0.0f); }
项目:TRHS_Club_Mod_2016    文件:PlaySoundEffectEvent.java   
public PlaySoundEffectEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{ super(manager, source, name, volume, pitch); }
项目:CauldronGit    文件:SoundEvent.java   
@Deprecated
public static SoundPoolEntry getResult(SoundResultEvent event)
{
    MinecraftForge.EVENT_BUS.post(event);
    return event.result;
}
项目:CauldronGit    文件:PlayBackgroundMusicEvent.java   
public PlayBackgroundMusicEvent(SoundManager manager, SoundPoolEntry entry)
{ super(manager, entry, null, 0.0f, 0.0f); }
项目:CauldronGit    文件:PlaySoundEffectEvent.java   
public PlaySoundEffectEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{ super(manager, source, name, volume, pitch); }
项目:Cauldron    文件:SoundEvent.java   
@Deprecated
public static SoundPoolEntry getResult(SoundResultEvent event)
{
    MinecraftForge.EVENT_BUS.post(event);
    return event.result;
}