Compare commits

...
Author SHA1 Message Date
miozune 8f84339842 Show handler order when hovering on tab and shift pressed 2022-08-26 02:46:49 +09:00
2 changed files with 6 additions and 1 deletions

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));
}
}