public class NoteBlockEvent extends BlockEvent
Modifier and Type | Class and Description |
---|---|
static class |
NoteBlockEvent.Change
Fired when a Noteblock is changed.
|
static class |
NoteBlockEvent.Instrument
Describes the types of musical Instruments that can be played by a Noteblock.
|
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.HarvestDropsEvent, BlockEvent.MultiPlaceEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PlaceEvent
Event.HasResult, Event.Result
Modifier | Constructor and Description |
---|---|
protected |
NoteBlockEvent(World world,
BlockPos pos,
IBlockState state,
int note) |
Modifier and Type | Method and Description |
---|---|
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, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
protected NoteBlockEvent(World world, BlockPos pos, IBlockState 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