Package net.minecraftforge.event.world
Class NoteBlockEvent.Play
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.BlockEvent
-
- net.minecraftforge.event.world.NoteBlockEvent
-
- net.minecraftforge.event.world.NoteBlockEvent.Play
-
- Enclosing class:
- NoteBlockEvent
public static class NoteBlockEvent.Play extends NoteBlockEvent
Fired when a Noteblock plays it's note. You can override the note and instrument Canceling this event will stop the note from playing.
-
-
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 NoteBlockInstrument
instrument
-
Constructor Summary
Constructors Constructor Description Play(World world, BlockPos pos, BlockState state, int note, NoteBlockInstrument instrument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteBlockInstrument
getInstrument()
void
setInstrument(NoteBlockInstrument instrument)
-
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
-
instrument
private NoteBlockInstrument instrument
-
-
Constructor Detail
-
Play
public Play(World world, BlockPos pos, BlockState state, int note, NoteBlockInstrument instrument)
-
-
Method Detail
-
getInstrument
public NoteBlockInstrument getInstrument()
-
setInstrument
public void setInstrument(NoteBlockInstrument instrument)
-
-