mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-13 17:04:03 +00:00
Add TaskProfiler back
This commit is contained in:
1 parent
6e23c51868
commit
458947628c
2 files changed
+9
No files matched your search
@@ -23,11 +23,15 @@ public class GuiCraftingRecipe extends GuiRecipe
|
||||
GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;
|
||||
|
||||
ArrayList<ICraftingHandler> handlers;
|
||||
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
|
||||
try {
|
||||
profiler.start("recipe.concurrent.crafting");
|
||||
handlers = forkJoinPool.submit(() -> getCraftingHandlers(outputId, results)).get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
} finally {
|
||||
profiler.end();
|
||||
}
|
||||
|
||||
if (handlers.isEmpty())
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import codechicken.core.TaskProfiler;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
@@ -22,11 +23,15 @@ public class GuiUsageRecipe extends GuiRecipe
|
||||
GuiContainer prevscreen = mc.currentScreen instanceof GuiContainer ? (GuiContainer) mc.currentScreen : null;
|
||||
|
||||
ArrayList<IUsageHandler> handlers;
|
||||
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
|
||||
try {
|
||||
profiler.start("recipe.concurrent.usage");
|
||||
handlers = forkJoinPool.submit(() -> getUsageHandlers(inputId, ingredients)).get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
} finally {
|
||||
profiler.end();
|
||||
}
|
||||
|
||||
if (handlers.isEmpty())
|
||||
|
||||
Reference in new issue
Block a user