本文整理了Java中net.minecraft.world.World.playSoundEffect()
方法的一些代码示例,展示了World.playSoundEffect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.playSoundEffect()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:playSoundEffect
暂无
代码示例来源:origin: coolAlias/Tutorial-Demo
@Override
public void process(EntityPlayer player, Side side) {
// Since this packet is handled differently, we need to check side
if (side.isClient()) {
// Plays a sound only the client can hear
player.playSound(sound, volume, pitch);
} else {
// Plays a sound that everyone nearby can hear
player.worldObj.playSoundEffect(x, y, z, sound, volume, pitch);
}
}
}
代码示例来源:origin: Electrical-Age/ElectricalAge
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, this.field_150939_a.stepSound.func_150496_b(), (this.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, this.field_150939_a.stepSound.getPitch() * 0.8F);
stack.stackSize -= 1;
内容来源于网络,如有侵权,请联系作者删除!