Package codechicken.core

Examples of codechicken.core.TaskProfiler


{
    public static boolean openRecipeGui(String inputId, Object... ingredients) {
        Minecraft mc = NEIClientUtils.mc();
        GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;

        TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
        ArrayList<IUsageHandler> handlers = new ArrayList<IUsageHandler>();
        for (IUsageHandler usagehandler : usagehandlers) {
            profiler.start(usagehandler.getRecipeName());
            IUsageHandler handler = usagehandler.getUsageHandler(inputId, ingredients);
            if (handler.numRecipes() > 0)
                handlers.add(handler);
        }
        profiler.end();
        if (handlers.isEmpty())
            return false;

        mc.displayGuiScreen(new GuiUsageRecipe(prevscreen, handlers));
        return true;
View Full Code Here


{
    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;
View Full Code Here

TOP

Related Classes of codechicken.core.TaskProfiler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.