本文整理汇总了Java中net.minecraft.client.audio.SoundPoolEntry类的典型用法代码示例。如果您正苦于以下问题:Java SoundPoolEntry类的具体用法?Java SoundPoolEntry怎么用?Java SoundPoolEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SoundPoolEntry类属于net.minecraft.client.audio包,在下文中一共展示了SoundPoolEntry类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: func_77371_c
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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");
}
}
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:SoundManager.java
示例2: func_77368_a
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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);
}
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:SoundManager.java
示例3: func_77364_b
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:SoundManager.java
示例4: func_77366_a
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:SoundManager.java
示例5: func_77459_a
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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);
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:SoundPool.java
示例6: PlaySoundEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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;
}
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:8,代码来源:PlaySoundEvent.java
示例7: SoundResultEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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;
}
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:11,代码来源:SoundResultEvent.java
示例8: PlayStreamingEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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;
}
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:8,代码来源:PlayStreamingEvent.java
示例9: func_82467_a
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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);
}
}
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:36,代码来源:SoundManager.java
示例10: func_77460_a
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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())));
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:SoundPool.java
示例11: SoundResultEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
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;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:SoundResultEvent.java
示例12: playSound
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
/**
* 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;
}
开发者ID:Dynious,项目名称:EnergyFromMatter,代码行数:43,代码来源:CustomSoundManager.java
示例13: getResult
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
@Deprecated
public static SoundPoolEntry getResult(SoundResultEvent event)
{
MinecraftForge.EVENT_BUS.post(event);
return event.result;
}
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:7,代码来源:SoundEvent.java
示例14: PlayBackgroundMusicEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
public PlayBackgroundMusicEvent(SoundManager manager, SoundPoolEntry entry)
{ super(manager, entry, null, 0.0f, 0.0f); }
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:3,代码来源:PlayBackgroundMusicEvent.java
示例15: PlaySoundEffectEvent
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
public PlaySoundEffectEvent(SoundManager manager, SoundPoolEntry source, String name, float volume, float pitch)
{ super(manager, source, name, volume, pitch); }
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:3,代码来源:PlaySoundEffectEvent.java
示例16: onGetNormalizedVolume
import net.minecraft.client.audio.SoundPoolEntry; //导入依赖的package包/类
@Inject(method="func_148594_a", [email protected]("HEAD"), cancellable=true)
private void onGetNormalizedVolume(ISound sound, SoundPoolEntry entry, SoundCategory category, CallbackInfoReturnable<Float> ci)
{
ci.setReturnValue((float)MathHelper.clamp(sound.getVolume() * entry.func_148649_c() * ControlPackMain.instance.getSoundVolume(sound.getSoundLocation().getResourcePath()), 0.0D, 1.0D) * this.func_148595_a(category));
}
开发者ID:uyjulian,项目名称:ControlPack,代码行数:6,代码来源:MixinSoundManager.java
注:本文中的net.minecraft.client.audio.SoundPoolEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论