本文整理汇总了Java中cn.nukkit.level.sound.NoteBoxSound.INSTRUMENT_TABOUR属性的典型用法代码示例。如果您正苦于以下问题:Java NoteBoxSound.INSTRUMENT_TABOUR属性的具体用法?Java NoteBoxSound.INSTRUMENT_TABOUR怎么用?Java NoteBoxSound.INSTRUMENT_TABOUR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cn.nukkit.level.sound.NoteBoxSound
的用法示例。
在下文中一共展示了NoteBoxSound.INSTRUMENT_TABOUR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstrument
public int getInstrument() {
Block below = this.down();
switch (below.getId()) {
case WOODEN_PLANK:
case NOTEBLOCK:
case CRAFTING_TABLE:
return NoteBoxSound.INSTRUMENT_BASS;
case SAND:
case SANDSTONE:
case SOUL_SAND:
return NoteBoxSound.INSTRUMENT_TABOUR;
case GLASS:
case GLASS_PANEL:
case GLOWSTONE_BLOCK:
return NoteBoxSound.INSTRUMENT_CLICK;
case COAL_ORE:
case DIAMOND_ORE:
case EMERALD_ORE:
case GLOWING_REDSTONE_ORE:
case GOLD_ORE:
case IRON_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
return NoteBoxSound.INSTRUMENT_BASS_DRUM;
default:
return NoteBoxSound.INSTRUMENT_PIANO;
}
}
示例2: getInstrument
public int getInstrument() {
Block below = this.getSide(Vector3.SIDE_DOWN);
switch (below.getId()) {
case WOODEN_PLANK:
case NOTEBLOCK:
case CRAFTING_TABLE:
return NoteBoxSound.INSTRUMENT_BASS;
case SAND:
case SANDSTONE:
case SOUL_SAND:
return NoteBoxSound.INSTRUMENT_TABOUR;
case GLASS:
case GLASS_PANEL:
case GLOWSTONE_BLOCK:
return NoteBoxSound.INSTRUMENT_CLICK;
case COAL_ORE:
case DIAMOND_ORE:
case EMERALD_ORE:
case GLOWING_REDSTONE_ORE:
case GOLD_ORE:
case IRON_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
return NoteBoxSound.INSTRUMENT_BASS_DRUM;
default:
return NoteBoxSound.INSTRUMENT_PIANO;
}
}