net.minecraft.world.World.playSoundEffect()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中net.minecraft.world.World.playSoundEffect()方法的一些代码示例,展示了World.playSoundEffect()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.playSoundEffect()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:playSoundEffect

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;

相关文章

微信公众号

最新文章

更多

World类方法