public static class NoteBlockEvent.Change extends NoteBlockEvent
NoteBlockEvent.setNote(Note, Octave)
.
Canceling this event will not change the note and also stop the Noteblock from playing it's note.NoteBlockEvent.Change, NoteBlockEvent.Instrument, NoteBlockEvent.Note, NoteBlockEvent.Octave, NoteBlockEvent.Play
BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.HarvestDropsEvent, BlockEvent.MultiPlaceEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PlaceEvent, BlockEvent.PortalSpawnEvent
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private NoteBlockEvent.Note |
oldNote |
private NoteBlockEvent.Octave |
oldOctave |
Constructor and Description |
---|
Change(World world,
BlockPos pos,
IBlockState state,
int oldNote,
int newNote) |
Modifier and Type | Method and Description |
---|---|
NoteBlockEvent.Note |
getOldNote() |
NoteBlockEvent.Octave |
getOldOctave() |
getNote, getOctave, getVanillaNoteId, setNote
getPos, getState, getWorld
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final NoteBlockEvent.Note oldNote
private final NoteBlockEvent.Octave oldOctave
public Change(World world, BlockPos pos, IBlockState state, int oldNote, int newNote)
public NoteBlockEvent.Note getOldNote()
public NoteBlockEvent.Octave getOldOctave()