Show handler order when hovering on tab and shift pressed (#281)

This commit is contained in:
miozune authored and GitHub committed 2022-08-26 22:14:08 +02:00
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));
}
}