public class NoteBlockEvent extends BlockEvent
Modifier and Type | Class and Description |
---|---|
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
Modifier and Type | Field and Description |
---|---|
private int |
noteId |
Modifier | Constructor and Description |
---|---|
protected |
NoteBlockEvent(World world,
BlockPos pos,
BlockState 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.
If octave is Octave.HIGH, note may only be Note.F_SHARP |
getPos, getState, getWorld
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