diff --git a/gradle.properties b/gradle.properties index 937a5fd..cc80dd6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon=false mc_version=1.7.10 nei_version=2.1.6-GTNH ae2_version=rv3-beta-52-GTNH -mod_version=1.2.20 +mod_version=1.2.22 forge_version=10.13.4.1614 mod_group=com.github.vfyjxf.neenergistics mod_id=neenergistics diff --git a/libs/appliedenergistics2-rv3-beta-51-GTNH-dev.jar b/libs/appliedenergistics2-rv3-beta-58-GTNH-dev.jar similarity index 84% rename from libs/appliedenergistics2-rv3-beta-51-GTNH-dev.jar rename to libs/appliedenergistics2-rv3-beta-58-GTNH-dev.jar index 258be5b..bdcbd80 100644 Binary files a/libs/appliedenergistics2-rv3-beta-51-GTNH-dev.jar and b/libs/appliedenergistics2-rv3-beta-58-GTNH-dev.jar differ diff --git a/libs/appliedenergistics2-rv3-beta-51-GTNH-sources.jar b/libs/appliedenergistics2-rv3-beta-58-GTNH-sources.jar similarity index 85% rename from libs/appliedenergistics2-rv3-beta-51-GTNH-sources.jar rename to libs/appliedenergistics2-rv3-beta-58-GTNH-sources.jar index ad0e759..82460e3 100644 Binary files a/libs/appliedenergistics2-rv3-beta-51-GTNH-sources.jar and b/libs/appliedenergistics2-rv3-beta-58-GTNH-sources.jar differ diff --git a/src/main/java/com/github/vfyjxf/nee/NEINeeConfig.java b/src/main/java/com/github/vfyjxf/nee/NEINeeConfig.java index f5437ba..94e53e6 100644 --- a/src/main/java/com/github/vfyjxf/nee/NEINeeConfig.java +++ b/src/main/java/com/github/vfyjxf/nee/NEINeeConfig.java @@ -13,6 +13,7 @@ import com.github.vfyjxf.nee.nei.NEECraftingHelper; import com.github.vfyjxf.nee.processor.IRecipeProcessor; import com.github.vfyjxf.nee.processor.RecipeProcessor; import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Optional; import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal; import org.lwjgl.input.Keyboard; import thaumicenergistics.client.gui.GuiKnowledgeInscriber; @@ -32,6 +33,10 @@ public class NEINeeConfig implements IConfigureNEI { registerKeyBindings(); + if (NEEConfig.drawHighlight) { + GuiContainerManager.addDrawHandler(NEEContainerDrawHandler.instance); + } + Set defaultIdentifiers = new HashSet<>( Arrays.asList("crafting", "crafting2x2", "brewing", "smelting", "fuel", null) ); @@ -46,10 +51,6 @@ public class NEINeeConfig implements IConfigureNEI { API.registerGuiOverlayHandler(GuiPatternTerm.class, new NEECraftingHandler(), ident); } - if (NEEConfig.drawHighlight) { - GuiContainerManager.addDrawHandler(NEEContainerDrawHandler.instance); - } - installCraftingTermSupport(); installWirelessCraftingTermSupport(); @@ -81,14 +82,14 @@ public class NEINeeConfig implements IConfigureNEI { private void installCraftingTermSupport() { API.registerGuiOverlay(GuiCraftingTerm.class, "crafting"); API.registerGuiOverlay(GuiCraftingTerm.class, "crafting2x2"); - API.registerGuiOverlayHandler(GuiCraftingTerm.class, new NEECraftingHelper(), "crafting"); - API.registerGuiOverlayHandler(GuiCraftingTerm.class, new NEECraftingHelper(), "crafting2x2"); + API.registerGuiOverlayHandler(GuiCraftingTerm.class, NEECraftingHelper.INSTANCE, "crafting"); + API.registerGuiOverlayHandler(GuiCraftingTerm.class, NEECraftingHelper.INSTANCE, "crafting2x2"); } private void installWirelessCraftingTermSupport() { if (Loader.isModLoaded("ae2wct")) { - API.registerGuiOverlayHandler(GuiWirelessCraftingTerminal.class, new NEECraftingHelper(), "crafting"); - API.registerGuiOverlayHandler(GuiWirelessCraftingTerminal.class, new NEECraftingHelper(), "crafting2x2"); + API.registerGuiOverlayHandler(GuiWirelessCraftingTerminal.class, NEECraftingHelper.INSTANCE, "crafting"); + API.registerGuiOverlayHandler(GuiWirelessCraftingTerminal.class, NEECraftingHelper.INSTANCE, "crafting2x2"); } } diff --git a/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java b/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java index 3962a2c..5705363 100644 --- a/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java +++ b/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java @@ -26,7 +26,7 @@ public class NotEnoughEnergistics { public static final String MODID = "neenergistics"; public static final String NAME = "NotEnoughEnergistics"; public static final String VERSION = "@VERSION@"; - public static final String DEPENDENCIES = "required-after:NotEnoughItems;required-after:appliedenergistics2"; + public static final String DEPENDENCIES = "required-after:NotEnoughItems;required-after:appliedenergistics2;after:ae2wct"; public static final String GUI_FACTORY = "com.github.vfyjxf.nee.config.NEEConfigGuiFactory"; public static final Logger logger = LogManager.getLogger("NotEnoughEnergistics"); diff --git a/src/main/java/com/github/vfyjxf/nee/client/NEEContainerDrawHandler.java b/src/main/java/com/github/vfyjxf/nee/client/NEEContainerDrawHandler.java index 05973cf..5598766 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/NEEContainerDrawHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/client/NEEContainerDrawHandler.java @@ -37,6 +37,8 @@ public class NEEContainerDrawHandler implements IContainerDrawHandler { private final Field overlayButtonsField; private final Field handlerField; private Method recipesPerPageMethod; + private boolean drawRequestTooltip; + private boolean drawCraftableTooltip; public NEEContainerDrawHandler() { this.overlayButtonsField = ReflectionHelper.findField(GuiRecipe.class, "overlayButtons"); @@ -116,6 +118,8 @@ public class NEEContainerDrawHandler implements IContainerDrawHandler { Gui.drawRect(slot.xDisplayPosition, slot.yDisplayPosition, slot.xDisplayPosition + 16, slot.yDisplayPosition + 16, new Color(0.0f, 0.0f, 1.0f, 0.4f).getRGB()); + this.drawCraftableTooltip = renderCraftableItems; + this.drawRequestTooltip = renderAutoAbleItems; } else if (renderMissingItems) { Gui.drawRect(slot.xDisplayPosition, slot.yDisplayPosition, slot.xDisplayPosition + 16, slot.yDisplayPosition + 16, @@ -133,33 +137,38 @@ public class NEEContainerDrawHandler implements IContainerDrawHandler { @SubscribeEvent public void onDrawScreen(GuiScreenEvent.DrawScreenEvent.Post event) { - if (event.gui instanceof GuiRecipe) { - GuiRecipe guiRecipe = (GuiRecipe) event.gui; - GuiButton[] overlayButtons = null; - try { - overlayButtons = (GuiButton[]) ReflectionHelper.findField(GuiRecipe.class, "overlayButtons").get(guiRecipe); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - if (overlayButtons != null) { - for (GuiButton button : overlayButtons) { - if (button.visible && button.enabled && GuiUtils.isMouseOverButton(button, event.mouseX, event.mouseY)) { - drawCraftingHelperTooltip(guiRecipe, event.mouseX, event.mouseY); + if (this.drawCraftableTooltip || this.drawRequestTooltip) { + if (event.gui instanceof GuiRecipe) { + GuiRecipe guiRecipe = (GuiRecipe) event.gui; + GuiButton[] overlayButtons = null; + try { + overlayButtons = (GuiButton[]) ReflectionHelper.findField(GuiRecipe.class, "overlayButtons").get(guiRecipe); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + if (overlayButtons != null) { + for (GuiButton button : overlayButtons) { + if (button.visible && button.enabled && GuiUtils.isMouseOverButton(button, event.mouseX, event.mouseY)) { + drawCraftingHelperTooltip(guiRecipe, event.mouseX, event.mouseY); + this.drawCraftableTooltip = false; + this.drawRequestTooltip = false; + } } } } } - } private void drawCraftingHelperTooltip(GuiRecipe guiRecipe, int mouseX, int mouseY) { List tooltips = new ArrayList<>(); - if (guiRecipe.firstGui instanceof GuiCraftingTerm || GuiUtils.isGuiWirelessCrafting(guiRecipe.firstGui)) { + boolean isCraftingTerm = guiRecipe.firstGui instanceof GuiCraftingTerm || GuiUtils.isGuiWirelessCrafting(guiRecipe.firstGui); + if (this.drawRequestTooltip && isCraftingTerm) { tooltips.add(String.format("%s" + EnumChatFormatting.GRAY + " + " + EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.crafting"), EnumChatFormatting.YELLOW + Keyboard.getKeyName(NEIClientConfig.getKeyBinding("nee.preview")))); } - if (guiRecipe.firstGui instanceof GuiPatternTerm || GuiUtils.isPatternTermExGui(guiRecipe.firstGui)) { + boolean isPatternTerm = guiRecipe.firstGui instanceof GuiPatternTerm || GuiUtils.isPatternTermExGui(guiRecipe.firstGui); + if (this.drawCraftableTooltip && isPatternTerm) { tooltips.add(EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.pattern")); } try { diff --git a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHelper.java b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHelper.java index 429acf8..18ccbb4 100644 --- a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHelper.java +++ b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHelper.java @@ -2,10 +2,10 @@ package com.github.vfyjxf.nee.nei; import appeng.client.gui.implementations.GuiCraftingTerm; import appeng.client.gui.implementations.GuiPatternTerm; -import appeng.container.implementations.ContainerCraftingTerm; import appeng.container.slot.SlotCraftingMatrix; import appeng.container.slot.SlotFakeCraftingMatrix; import appeng.core.AELog; +import appeng.core.sync.AppEngPacket; import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.packets.PacketNEIRecipe; import appeng.util.Platform; @@ -15,16 +15,19 @@ import codechicken.nei.PositionedStack; import codechicken.nei.api.IOverlayHandler; import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.IRecipeHandler; +import com.github.vfyjxf.nee.NotEnoughEnergistics; +import com.github.vfyjxf.nee.config.NEEConfig; import com.github.vfyjxf.nee.network.NEENetworkHandler; import com.github.vfyjxf.nee.network.packet.PacketCraftingHelper; import com.github.vfyjxf.nee.utils.GuiUtils; import com.github.vfyjxf.nee.utils.IngredientTracker; +import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.ReflectionHelper; +import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; @@ -46,6 +49,8 @@ public class NEECraftingHelper implements IOverlayHandler { public static int stackIndex = 1; public static boolean noPreview = false; + public static final NEECraftingHelper INSTANCE = new NEECraftingHelper(); + @Override public void overlayRecipe(GuiContainer firstGui, IRecipeHandler recipe, int recipeIndex, boolean shift) { boolean isCraftingGuiTerm = firstGui instanceof GuiCraftingTerm || GuiUtils.isGuiWirelessCrafting(firstGui); @@ -85,13 +90,19 @@ public class NEECraftingHelper implements IOverlayHandler { final List ingredients = recipe.getIngredientStacks(recipeIndex); if (firstGui instanceof GuiCraftingTerm) { PacketNEIRecipe packet = new PacketNEIRecipe(packIngredients(firstGui, ingredients, false)); - if (packet.size() >= 32 * 1024) { + //don't use gtnh ae2's method; + int packetSize = getPacketSize(packet); + if (packetSize >= 32 * 1024) { AELog.warn("Recipe for " + recipe.getRecipeName() + " has too many variants, reduced version will be used"); packet = new PacketNEIRecipe(packIngredients(firstGui, ingredients, true)); } - NetworkHandler.instance.sendToServer(packet); + if (packetSize >= 0) { + NetworkHandler.instance.sendToServer(packet); + }else { + NotEnoughEnergistics.logger.error("Can't get packet size!"); + } } else if (GuiUtils.isGuiWirelessCrafting(firstGui)) { - net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler.instance.sendToServer(new net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketNEIRecipe(packIngredients(firstGui, ingredients, false))); + moveItemsForWirelessCrafting(firstGui, ingredients); } } catch (final Exception | Error ignored) { } @@ -164,36 +175,56 @@ public class NEECraftingHelper implements IOverlayHandler { return false; } + private int getPacketSize(AppEngPacket packet) { + try { + ByteBuf p = (ByteBuf) ReflectionHelper.findField(AppEngPacket.class, "p").get(packet); + return p.array().length; + } catch (IllegalAccessException e) { + return -1; + } + } + + @Optional.Method(modid = "ae2wct") + private void moveItemsForWirelessCrafting(GuiContainer firstGui, List ingredients) { + try { + net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler.instance.sendToServer(new net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketNEIRecipe(packIngredients(firstGui, ingredients, false))); + } catch (IOException e) { + e.printStackTrace(); + } + } + @SubscribeEvent public void onActionPerformedEventPre(GuiScreenEvent.ActionPerformedEvent.Pre event) { - //make nei's transfer system doesn't require presses shift - if (event.gui instanceof GuiRecipe) { - GuiRecipe guiRecipe = (GuiRecipe) event.gui; - GuiButton[] overlayButtons = null; - final int OVERLAY_BUTTON_ID_START = 4; - try { - overlayButtons = (GuiButton[]) ReflectionHelper.findField(GuiRecipe.class, "overlayButtons").get(guiRecipe); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - if (overlayButtons != null && event.button.id >= OVERLAY_BUTTON_ID_START && event.button.id < OVERLAY_BUTTON_ID_START + overlayButtons.length) { - boolean isPatternTerm = guiRecipe.firstGui instanceof GuiPatternTerm || GuiUtils.isPatternTermExGui(guiRecipe.firstGui); - boolean isCraftingTerm = guiRecipe.firstGui instanceof GuiCraftingTerm || GuiUtils.isGuiWirelessCrafting(guiRecipe.firstGui); - if (isCraftingTerm || isPatternTerm) { - int recipesPerPage = -1; - IRecipeHandler handler = null; - try { - recipesPerPage = (int) ReflectionHelper.findMethod(GuiRecipe.class, guiRecipe, new String[]{"getRecipesPerPage"}).invoke(guiRecipe); - handler = (IRecipeHandler) ReflectionHelper.findField(GuiRecipe.class, "handler").get(guiRecipe); - } catch (IllegalAccessException | InvocationTargetException e) { - e.printStackTrace(); - } - if (recipesPerPage >= 0 && handler != null) { - int recipe = guiRecipe.page * recipesPerPage + event.button.id - OVERLAY_BUTTON_ID_START; - final IOverlayHandler overlayHandler = handler.getOverlayHandler(guiRecipe.firstGui, recipe); - Minecraft.getMinecraft().displayGuiScreen(guiRecipe.firstGui); - overlayHandler.overlayRecipe(guiRecipe.firstGui, guiRecipe.currenthandlers.get(guiRecipe.recipetype), recipe, NEIClientUtils.shiftKey()); - event.setCanceled(true); + if (NEEConfig.noShift) { + //make nei's transfer system doesn't require presses shift + if (event.gui instanceof GuiRecipe) { + GuiRecipe guiRecipe = (GuiRecipe) event.gui; + GuiButton[] overlayButtons = null; + final int OVERLAY_BUTTON_ID_START = 4; + try { + overlayButtons = (GuiButton[]) ReflectionHelper.findField(GuiRecipe.class, "overlayButtons").get(guiRecipe); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + if (overlayButtons != null && event.button.id >= OVERLAY_BUTTON_ID_START && event.button.id < OVERLAY_BUTTON_ID_START + overlayButtons.length) { + boolean isPatternTerm = guiRecipe.firstGui instanceof GuiPatternTerm || GuiUtils.isPatternTermExGui(guiRecipe.firstGui); + boolean isCraftingTerm = guiRecipe.firstGui instanceof GuiCraftingTerm || GuiUtils.isGuiWirelessCrafting(guiRecipe.firstGui); + if (isCraftingTerm || isPatternTerm) { + int recipesPerPage = -1; + IRecipeHandler handler = null; + try { + recipesPerPage = (int) ReflectionHelper.findMethod(GuiRecipe.class, guiRecipe, new String[]{"getRecipesPerPage"}).invoke(guiRecipe); + handler = (IRecipeHandler) ReflectionHelper.findField(GuiRecipe.class, "handler").get(guiRecipe); + } catch (IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + if (recipesPerPage >= 0 && handler != null) { + int recipe = guiRecipe.page * recipesPerPage + event.button.id - OVERLAY_BUTTON_ID_START; + final IOverlayHandler overlayHandler = handler.getOverlayHandler(guiRecipe.firstGui, recipe); + Minecraft.getMinecraft().displayGuiScreen(guiRecipe.firstGui); + overlayHandler.overlayRecipe(guiRecipe.firstGui, guiRecipe.currenthandlers.get(guiRecipe.recipetype), recipe, NEIClientUtils.shiftKey()); + event.setCanceled(true); + } } } } diff --git a/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java b/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java index 8c06f1e..0a25b5b 100644 --- a/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java +++ b/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java @@ -18,7 +18,7 @@ public class ClientProxy extends CommonProxy { FMLCommonHandler.instance().bus().register(new GuiHandler()); MinecraftForge.EVENT_BUS.register(new GuiHandler()); if (NEEConfig.noShift) { - MinecraftForge.EVENT_BUS.register(new NEECraftingHelper()); + MinecraftForge.EVENT_BUS.register(NEECraftingHelper.INSTANCE); } if(NEEConfig.drawHighlight){ MinecraftForge.EVENT_BUS.register(NEEContainerDrawHandler.instance); diff --git a/src/main/java/com/github/vfyjxf/nee/utils/IngredientTracker.java b/src/main/java/com/github/vfyjxf/nee/utils/IngredientTracker.java index 56b11df..d470e37 100644 --- a/src/main/java/com/github/vfyjxf/nee/utils/IngredientTracker.java +++ b/src/main/java/com/github/vfyjxf/nee/utils/IngredientTracker.java @@ -1,6 +1,5 @@ package com.github.vfyjxf.nee.utils; -import appeng.api.AEApi; import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IItemList; import appeng.client.gui.implementations.GuiMEMonitorable; @@ -18,11 +17,10 @@ import java.util.List; public class IngredientTracker { - private List craftbleAEItemStacks; - private List ingredients = new ArrayList<>(); + private final List ingredients = new ArrayList<>(); public IngredientTracker(GuiContainer gui, IRecipeHandler recipe, int recipeIndex) { - this.craftbleAEItemStacks = getCraftableStacks(gui); + List craftableStacks = getCraftableStacks(gui); List requiredIngredients = new ArrayList<>(); for (PositionedStack positionedStack : recipe.getIngredientStacks(recipeIndex)) { boolean find = false; @@ -43,7 +41,7 @@ public class IngredientTracker { Ingredient ingredient = new Ingredient(requiredIngredient); ingredients.add(ingredient); - for (IAEItemStack stack : NEEConfig.matchOtherItems ? this.getStorageStacks(gui) : craftbleAEItemStacks) { + for (IAEItemStack stack : NEEConfig.matchOtherItems ? this.getStorageStacks(gui) : craftableStacks) { if (requiredIngredient.contains(stack.getItemStack())) { if (stack.isCraftable()) { ingredient.setCraftableIngredient(stack.getItemStack()); @@ -55,32 +53,56 @@ public class IngredientTracker { } public IngredientTracker(GuiContainer gui, List requiredIngredients) { - IItemList aeItemStacks = this.getStorageStacks(gui); + for (PositionedStack positionedStack : requiredIngredients) { this.ingredients.add(new Ingredient(positionedStack)); } + + List craftableStacks = this.getCraftableStacks(gui); + + //set craftable stack for (Ingredient ingredient : this.ingredients) { - for (IAEItemStack stack : aeItemStacks) { + for (IAEItemStack stack : craftableStacks) { if (ingredient.getIngredients().contains(stack.getItemStack())) { - if (ingredient.getCraftableIngredient() == null && stack.isCraftable()) { + if (!ingredient.isCraftable()) { ingredient.setCraftableIngredient(stack.getItemStack()); } if (stack.getStackSize() > 0) { + int missingCount = (int) ingredient.getMissingCount(); ingredient.addCurrentCount(stack.getStackSize()); if (ingredient.requiresToCraft()) { stack.setStackSize(0); } else { - stack.setStackSize(stack.getStackSize() - ingredient.getRequireCount()); + stack.setStackSize(stack.getStackSize() - missingCount); } } } } } + + if (NEEConfig.matchOtherItems) { + List otherStacks = this.getStorageStacks(gui); + otherStacks.removeAll(craftableStacks); + for (Ingredient ingredient : this.ingredients) { + for (IAEItemStack stack : otherStacks) { + if (ingredient.requiresToCraft() && ingredient.getIngredients().contains(stack.getItemStack())) { + int missingCount = (int) ingredient.getMissingCount(); + ingredient.addCurrentCount(stack.getStackSize()); + if (ingredient.requiresToCraft()) { + stack.setStackSize(0); + } else { + stack.setStackSize(stack.getStackSize() - missingCount); + } + } + } + } + } + } @SuppressWarnings("unchecked") private List getCraftableStacks(GuiContainer gui) { - List craftableAEItemSafcks = new ArrayList<>(); + List craftableStacks = new ArrayList<>(); IItemList list = null; try { if (!GuiUtils.isGuiWirelessCrafting(gui)) { @@ -98,16 +120,16 @@ public class IngredientTracker { if (list != null) { for (IAEItemStack stack : list) { if (stack.isCraftable()) { - craftableAEItemSafcks.add(stack.copy()); + craftableStacks.add(stack.copy()); } } } - return craftableAEItemSafcks; + return craftableStacks; } @SuppressWarnings("unchecked") - private IItemList getStorageStacks(GuiContainer gui) { - IItemList list = AEApi.instance().storage().createItemList(); + private List getStorageStacks(GuiContainer gui) { + List list = new ArrayList<>(); try { if (!GuiUtils.isGuiWirelessCrafting(gui)) { ItemRepo repo = (ItemRepo) ReflectionHelper.findField(GuiMEMonitorable.class, "repo").get(gui); @@ -149,7 +171,7 @@ public class IngredientTracker { for (Ingredient ingredient : this.ingredients) { if (ingredient.requiresToCraft()) { if (NEEConfig.matchOtherItems) { - if (stack.stackSize > 0 && ingredient.getIngredients().contains(stack) && ItemStack.areItemStackTagsEqual(ingredient.getCraftableIngredient(), stack)) { + if (stack.stackSize > 0 && ingredient.getIngredients().contains(stack)) { int missingCount = (int) ingredient.getMissingCount(); ingredient.addCurrentCount(stack.stackSize); if (ingredient.requiresToCraft()) {