File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/main/java/net/minecraftforge/eventbus Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -192,17 +192,16 @@ private void addChild(ListenerListInst child) {
192192 * Rebuild the local Array of listeners, returns early if there is no work to do.
193193 */
194194 private void buildCache () {
195- if (parent != null && parent .shouldRebuild ())
195+ if (parent != null && parent .shouldRebuild ())
196196 parent .buildCache ();
197197
198198 ArrayList <IEventListener > ret = new ArrayList <>();
199- Arrays . stream ( EVENT_PRIORITY_VALUES ). forEach ( value -> {
199+ for ( EventPriority value : EVENT_PRIORITY_VALUES ) {
200200 List <IEventListener > listeners = getListeners (value );
201- if (!listeners .isEmpty ()) {
202- ret .add (value ); //Add the priority to notify the event of it's current phase.
203- ret .addAll (listeners );
204- }
205- });
201+ if (listeners .isEmpty ()) continue ;
202+ ret .add (value ); // Add the priority to notify the event of its current phase.
203+ ret .addAll (listeners );
204+ }
206205 this .listeners .set (ret .toArray (new IEventListener [0 ]));
207206 rebuild = false ;
208207 }
You can’t perform that action at this time.
0 commit comments