Class NoteBlockEvent.Play
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.NoteBlockEvent
net.neoforged.neoforge.event.level.NoteBlockEvent.Play
- All Implemented Interfaces:
 net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
 - NoteBlockEvent
 
public static class NoteBlockEvent.Play
extends NoteBlockEvent
implements net.neoforged.bus.api.ICancellableEvent
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.neoforged.neoforge.event.level.NoteBlockEvent
NoteBlockEvent.Change, NoteBlockEvent.Note, NoteBlockEvent.Octave, NoteBlockEvent.PlayNested classes/interfaces inherited from class net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.CreateFluidSourceEvent, BlockEvent.CropGrowEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEventNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionPlay(Level world, BlockPos pos, BlockState state, int note, NoteBlockInstrument instrument)  - 
Method Summary
Methods inherited from class net.neoforged.neoforge.event.level.NoteBlockEvent
getNote, getOctave, getVanillaNoteId, setNoteMethods inherited from class net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getStateMethods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled 
- 
Field Details
- 
instrument
 
 - 
 - 
Constructor Details
- 
Play
 
 - 
 - 
Method Details
- 
getInstrument
 - 
setInstrument
 
 -