Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds NoteBlock events - Includes Change and Play events - Adds Minecart Update event - Adds consistent formatting to CommonEventHandler
- Loading branch information
1 parent
21d37e3
commit 20c1811
Showing
14 changed files
with
438 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
CraftTweaker2-API/src/main/java/crafttweaker/api/event/IBlockEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
CraftTweaker2-API/src/main/java/crafttweaker/api/event/INoteBlockEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package crafttweaker.api.event; | ||
|
||
import crafttweaker.annotations.ZenRegister; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenGetter; | ||
import stanhebben.zenscript.annotations.ZenSetter; | ||
|
||
@ZenClass("crafttweaker.event.INoteBlockEvent") | ||
@ZenRegister | ||
public interface INoteBlockEvent extends IBlockEvent { | ||
|
||
@ZenGetter("note") | ||
String getNote(); | ||
|
||
@ZenSetter("note") | ||
void setNote(String note, String octave); | ||
|
||
@ZenGetter("octave") | ||
String getOctave(); | ||
|
||
@ZenGetter("noteId") | ||
int getNoteId(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
CraftTweaker2-API/src/main/java/crafttweaker/api/event/MinecartUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package crafttweaker.api.event; | ||
|
||
import crafttweaker.annotations.ZenRegister; | ||
import crafttweaker.api.world.IBlockPos; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenGetter; | ||
|
||
@ZenClass("crafttweaker.event.MinecartUpdateEvent") | ||
@ZenRegister | ||
public interface MinecartUpdateEvent extends IMinecartEvent, IEventPositionable { | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
CraftTweaker2-API/src/main/java/crafttweaker/api/event/NoteBlockChangeEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package crafttweaker.api.event; | ||
|
||
import crafttweaker.annotations.ZenRegister; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenGetter; | ||
|
||
@ZenClass("crafttweaker.event.NoteBlockChangeEvent") | ||
@ZenRegister | ||
public interface NoteBlockChangeEvent extends INoteBlockEvent, IEventCancelable { | ||
|
||
@ZenGetter("oldNote") | ||
String getOldNote(); | ||
|
||
@ZenGetter("oldOctave") | ||
String getOldOctave(); | ||
} |
17 changes: 17 additions & 0 deletions
17
CraftTweaker2-API/src/main/java/crafttweaker/api/event/NoteBlockPlayEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package crafttweaker.api.event; | ||
|
||
import crafttweaker.annotations.ZenRegister; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenGetter; | ||
import stanhebben.zenscript.annotations.ZenSetter; | ||
|
||
@ZenClass("crafttweaker.event.NoteBlockPlayEvent") | ||
@ZenRegister | ||
public interface NoteBlockPlayEvent extends INoteBlockEvent, IEventCancelable { | ||
|
||
@ZenGetter("instrument") | ||
String getInstrument(); | ||
|
||
@ZenSetter("instrument") | ||
void setInstrument(String instrument); | ||
} |
Oops, something went wrong.