mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-22 05:02:11 +00:00
Allow using handlerId for handler order (#290)
This commit is contained in:
1 parent
a2c037e0c0
commit
748695158f
1 file changed
+7
-1
@@ -88,7 +88,13 @@ public class NEIClientConfig {
|
||||
handler -> Objects.firstNonNull(handler.getOverlayIdentifier(), handler.getHandlerId());
|
||||
|
||||
public static int getHandlerOrder(IRecipeHandler handler) {
|
||||
return handlerOrdering.getOrDefault(HANDLER_ID_FUNCTION.apply(handler), 0);
|
||||
if (handlerOrdering.get(handler.getOverlayIdentifier()) != null) {
|
||||
return handlerOrdering.get(handler.getOverlayIdentifier());
|
||||
}
|
||||
if (handlerOrdering.get(handler.getHandlerId()) != null) {
|
||||
return handlerOrdering.get(handler.getHandlerId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Comparator that compares handlers using the handlerOrdering map.
|
||||
|
||||
Reference in new issue
Block a user