mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 16:37:45 +00:00
Show handler order when hovering on tab and shift pressed (#281)
This commit is contained in:
1 parent
e61120099a
commit
46d90b6923
2 files changed
+6
-1
No files matched your search
@@ -87,9 +87,13 @@ public class NEIClientConfig {
|
||||
public static final Function<IRecipeHandler, String> HANDLER_ID_FUNCTION =
|
||||
handler -> Objects.firstNonNull(handler.getOverlayIdentifier(), handler.getHandlerId());
|
||||
|
||||
public static int getHandlerOrder(IRecipeHandler handler) {
|
||||
return handlerOrdering.getOrDefault(HANDLER_ID_FUNCTION.apply(handler), 0);
|
||||
}
|
||||
|
||||
// Comparator that compares handlers using the handlerOrdering map.
|
||||
public static final Comparator<IRecipeHandler> HANDLER_COMPARATOR =
|
||||
Comparator.comparingInt(handler -> handlerOrdering.getOrDefault(HANDLER_ID_FUNCTION.apply(handler), 0));
|
||||
Comparator.comparingInt(NEIClientConfig::getHandlerOrder);
|
||||
|
||||
public static ItemStack[] creativeInv;
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
tooltip.add("");
|
||||
tooltip.add("HandlerName: " + handlerName);
|
||||
tooltip.add("HandlerID: " + handlerID);
|
||||
tooltip.add("HandlerOrder: " + NEIClientConfig.getHandlerOrder(handler));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user