Skip to content
This repository was archived by the owner on May 26, 2018. It is now read-only.

Commit a5f229e

Browse files
committed
Added extra priorities to support Sponge
1 parent 5365f5e commit a5f229e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/main/java/cpw/mods/fml/common/eventhandler/EventBus.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ public boolean post(Event event)
147147
return (event.isCancelable() ? event.isCanceled() : false);
148148
}
149149

150+
public int getBusID() {
151+
return busID;
152+
}
153+
150154
@Override
151155
public void handleException(EventBus bus, Event event, IEventListener[] listeners, int index, Throwable throwable)
152156
{

src/main/java/cpw/mods/fml/common/eventhandler/EventPriority.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ public enum EventPriority implements IEventListener
88
* Due to using a ArrayList in the ListenerList,
99
* these need to stay in a contiguous index starting at 0. {Default ordinal}
1010
*/
11-
HIGHEST, //First to execute
11+
PRE, //First to execute. Cancellation is not allowed
12+
AFTER_PRE, //Cancellation is not allowed
13+
HIGHEST, //First standard priority to execute
1214
HIGH,
1315
NORMAL,
1416
LOW,
15-
LOWEST //Last to execute
17+
LOWEST, //Last standard priority to execute
18+
BEFORE_POST, //Cancellation is not allowed
19+
POST //Last to execute. Cancellation is not allowed
1620
;
1721

1822
@Override

0 commit comments

Comments
 (0)