Package net.minecraftforge.event.world
Class NoteBlockEvent.Change
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.BlockEvent
-
- net.minecraftforge.event.world.NoteBlockEvent
-
- net.minecraftforge.event.world.NoteBlockEvent.Change
-
- Enclosing class:
- NoteBlockEvent
public static class NoteBlockEvent.Change extends NoteBlockEvent
Fired when a Noteblock is changed. You can adjust the note it will change to viaNoteBlockEvent.setNote(Note, Octave). Canceling this event will not change the note and also stop the Noteblock from playing it's note.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.world.NoteBlockEvent
NoteBlockEvent.Change, NoteBlockEvent.Note, NoteBlockEvent.Octave, NoteBlockEvent.Play
-
Nested classes/interfaces inherited from class net.minecraftforge.event.world.BlockEvent
BlockEvent.BlockToolInteractEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
-
Field Summary
Fields Modifier and Type Field Description private NoteBlockEvent.NoteoldNoteprivate NoteBlockEvent.OctaveoldOctave
-
Constructor Summary
Constructors Constructor Description Change(World world, BlockPos pos, BlockState state, int oldNote, int newNote)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteBlockEvent.NotegetOldNote()NoteBlockEvent.OctavegetOldOctave()-
Methods inherited from class net.minecraftforge.event.world.NoteBlockEvent
getNote, getOctave, getVanillaNoteId, setNote
-
Methods inherited from class net.minecraftforge.event.world.BlockEvent
getPos, getState, getWorld
-
-
-
-
Field Detail
-
oldNote
private final NoteBlockEvent.Note oldNote
-
oldOctave
private final NoteBlockEvent.Octave oldOctave
-
-
Constructor Detail
-
Change
public Change(World world, BlockPos pos, BlockState state, int oldNote, int newNote)
-
-
Method Detail
-
getOldNote
public NoteBlockEvent.Note getOldNote()
-
getOldOctave
public NoteBlockEvent.Octave getOldOctave()
-
-