public interface NoteBlock extends BlockState
| 限定符和类型 | 方法和说明 |
|---|---|
Note |
getNote()
获取一个音符盒对象.
|
byte |
getRawNote()
已过时。
不安全的参数
|
boolean |
play()
尝试播放一个音符.
|
boolean |
play(byte instrument,
byte note)
已过时。
不安全的参数
|
boolean |
play(Instrument instrument,
Note note)
用任意乐器播放任意音符.
|
void |
setNote(Note note)
设置一个音符盒对象.
|
void |
setRawNote(byte note)
已过时。
不安全的参数
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, updategetMetadata, hasMetadata, removeMetadata, setMetadataNote getNote()
原文: Gets the note.
@Deprecated byte getRawNote()
原文: Gets the note.
void setNote(Note note)
原文: Set the note.
note - 音符盒对象.@Deprecated void setRawNote(byte note)
原文: Set the note.
note - 音符盒ID.boolean play()
如果这个方块不是音符盒,将返回false.
原文: Attempts to play the note at the block.
If the block represented by this block state is no longer a note block, this will return false.
java.lang.IllegalStateException - 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)@Deprecated
boolean play(byte instrument,
byte note)
原文: Plays an arbitrary note with an arbitrary instrument
instrument - 乐器idnote - 音符盒idjava.lang.IllegalStateException - 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)boolean play(Instrument instrument, Note note)
如果这个方块不是一个音符盒, 那么使用本方法将返回false. 原文: Plays an arbitrary note with an arbitrary instrument at the block.
If the block represented by this block state is no longer a note block, this will return false.
instrument - 乐器note - 音符盒java.lang.IllegalStateException - 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)Note