类 NoteBlockEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.NoteBlockEvent
- 直接已知子类:
NoteBlockEvent.Change
,NoteBlockEvent.Play
Base class for Noteblock Events
-
嵌套类概要
嵌套类修饰符和类型类说明static class
Fired when a Noteblock is changed.static enum
Information about the pitch of a Noteblock note.static enum
Describes the Octave of a Note being played by a Noteblock.static class
Fired when a Noteblock plays it's note.从类继承的嵌套类/接口 net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getNote()
Get the Note the Noteblock is tuned toGet the Octave of the note this Noteblock is tuned toint
get the vanilla note-id, which contains information about both Note and Octave.void
setNote
(NoteBlockEvent.Note note, NoteBlockEvent.Octave octave) Set Note and Octave for this event.
If octave is Octave.HIGH, note may only be Note.F_SHARP从类继承的方法 net.neoforged.neoforge.event.level.BlockEvent
getLevel, getPos, getState
-
字段详细资料
-
noteId
private int noteId
-
-
构造器详细资料
-
NoteBlockEvent
-
-
方法详细资料
-
getNote
Get the Note the Noteblock is tuned to- 返回:
- the Note
-
getOctave
Get the Octave of the note this Noteblock is tuned to- 返回:
- the Octave
-
getVanillaNoteId
public int getVanillaNoteId()get the vanilla note-id, which contains information about both Note and Octave. Most modders should not need this.- 返回:
- an ID for the note
-
setNote
Set Note and Octave for this event.
If octave is Octave.HIGH, note may only be Note.F_SHARP- 参数:
note
- the Noteoctave
- the Octave
-