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.Play
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPlay
(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, setNote
Methods inherited from class net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
instrument
-
-
Constructor Details
-
Play
-
-
Method Details
-
getInstrument
-
setInstrument
-