This repository was archived by the owner on May 26, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 198
Added extra priorities to support Sponge #518
Open
Raphfrk
wants to merge
1
commit into
MinecraftForge:master
Choose a base branch
from
Raphfrk:extra_priorities
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -8,11 +8,15 @@ public enum EventPriority implements IEventListener | |
* Due to using a ArrayList in the ListenerList, | ||
* these need to stay in a contiguous index starting at 0. {Default ordinal} | ||
*/ | ||
HIGHEST, //First to execute | ||
PRE, //First to execute. Cancellation is not allowed | ||
AFTER_PRE, //Cancellation is not allowed | ||
HIGHEST, //First standard priority to execute | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still dont agree with adding this new things. It gives no extra functionality besides 'I wanna have more!' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It means we can do a one to one mapping of the priorities. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand that is your intention, however, I've had discussions about this. As i said, Sponge shouldn't be adding more for the sake of having more... |
||
HIGH, | ||
NORMAL, | ||
LOW, | ||
LOWEST //Last to execute | ||
LOWEST, //Last standard priority to execute | ||
BEFORE_POST, //Cancellation is not allowed | ||
POST //Last to execute. Cancellation is not allowed | ||
; | ||
|
||
@Override | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? ListenerLists are internal structures. Sponge should not be firing things on them manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you support direct listener registration (and unregistration), rather than passing the object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, what are you wanting to do specifically. There should be nothing wrong with passing listeners in via the normal register function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sponge uses a different subscription marker for example. I guess at minimum, there would need to be a way to specify how methods are marked as handler methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, and there is/will be. I've already spoken with blood and sk about this.