public enum Instrument extends java.lang.Enum<Instrument>
| 枚举常量和说明 | 
|---|
| BASS_DRUM当音符盒在一个石类方块的顶部时通常会以低音鼓的形式演奏。 | 
| BASS_GUITAR当音符盒在一个木类方块的顶部时通常会以低音吉他的形式演奏。 | 
| BELLBell is normally played when a note block is on top of a gold block. | 
| CHIMEChime is normally played when a note block is on top of a packed ice
 block. | 
| FLUTEFlute is normally played when a note block is on top of a clay block. | 
| GUITARGuitar is normally played when a note block is on top of a woolen block. | 
| PIANO钢琴是音符盒的标准乐器。 | 
| SNARE_DRUM当音符盒在一个沙类方块的顶部时通常会以小军鼓的形式演奏。 | 
| STICKS当音符盒在一个玻璃方块的顶部时通常会以鼓槌的形式演奏。 | 
| XYLOPHONEXylophone is normally played when a note block is on top of a bone block. | 
| 限定符和类型 | 方法和说明 | 
|---|---|
| static Instrument | getByType(byte type)已过时。 
 不安全的参数 | 
| byte | getType()已过时。 
 不安全的参数 | 
| static Instrument | valueOf(java.lang.String name)返回带有指定名称的该类型的枚举常量。 | 
| static Instrument[] | values()按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。 | 
public static final Instrument PIANO
public static final Instrument BASS_DRUM
public static final Instrument SNARE_DRUM
public static final Instrument STICKS
public static final Instrument BASS_GUITAR
public static final Instrument FLUTE
public static final Instrument BELL
public static final Instrument GUITAR
public static final Instrument CHIME
public static final Instrument XYLOPHONE
public static Instrument[] values()
for (Instrument c : Instrument.values()) System.out.println(c);
public static Instrument valueOf(java.lang.String name)
name - 要返回的枚举常量的名称。java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException - 如果参数为空值@Deprecated public byte getType()
@Deprecated public static Instrument getByType(byte type)
原文: Get an instrument by its type ID.
type - 类型ID