public class NoteBlockEvent extends BlockEvent
修飾子とタイプ | クラスと説明 |
---|---|
static class |
NoteBlockEvent.Change
Fired when a Noteblock is changed.
|
static class |
NoteBlockEvent.Note
Information about the pitch of a Noteblock note.
|
static class |
NoteBlockEvent.Octave
Describes the Octave of a Note being played by a Noteblock.
|
static class |
NoteBlockEvent.Play
Fired when a Noteblock plays it's note.
|
BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.HarvestDropsEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
Event.HasResult, Event.Result
修飾子 | コンストラクタと説明 |
---|---|
protected |
NoteBlockEvent(World world,
BlockPos pos,
BlockState state,
int note) |
修飾子とタイプ | メソッドと説明 |
---|---|
NoteBlockEvent.Note |
getNote()
Get the Note the Noteblock is tuned to
|
NoteBlockEvent.Octave |
getOctave()
Get the Octave of the note this Noteblock is tuned to
|
int |
getVanillaNoteId()
get the vanilla note-id, which contains information about both Note and Octave.
|
void |
setNote(NoteBlockEvent.Note note,
NoteBlockEvent.Octave octave)
Set Note and Octave for this event.
|
getPos, getState, getWorld
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
protected NoteBlockEvent(World world, BlockPos pos, BlockState state, int note)
public NoteBlockEvent.Note getNote()
public NoteBlockEvent.Octave getOctave()
public int getVanillaNoteId()
public void setNote(NoteBlockEvent.Note note, NoteBlockEvent.Octave octave)
note
- the Noteoctave
- the Octave