import java.util.ArrayList;
public class GuiCraftingRecipe extends GuiRecipe
{
public static boolean openRecipeGui(String outputId, Object... results) {
Minecraft mc = NEIClientUtils.mc();
GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
ArrayList<ICraftingHandler> handlers = new ArrayList<ICraftingHandler>();
for (ICraftingHandler craftinghandler : craftinghandlers) {
profiler.start(craftinghandler.getRecipeName());
ICraftingHandler handler = craftinghandler.getRecipeHandler(outputId, results);
if (handler.numRecipes() > 0)
handlers.add(handler);
}
profiler.end();
if (handlers.isEmpty())
return false;
mc.displayGuiScreen(new GuiCraftingRecipe(prevscreen, handlers));
return true;
}