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
slprime e61120099a Fix DnD Real Item as Ghost (#279) 2022-08-23 21:15:37 +02:00
3 changed files with 7 additions and 5 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;
@@ -250,7 +250,7 @@ public abstract class PanelWidget extends Widget {
if (NEIClientUtils.getHeldItem() != null) {
final ItemStack draggedStack = NEIClientUtils.getHeldItem().copy();
handleGUIContainerClick(draggedStack, mouseX, mouseY, button);
return handleGUIContainerClick(draggedStack, mouseX, mouseY, button);
}
return false;
@@ -289,9 +289,6 @@ public abstract class PanelWidget extends Widget {
GuiInfo.readLock.lock();
for (INEIGuiHandler handler : GuiInfo.guiHandlers) {
if (handler.handleDragNDrop(gui, mouseX, mouseY, draggedStack, button)) {
NEIClientConfig.logger.info(handler);
handled = true;
break;
}
@@ -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));
}
}