Add more error message for crash with recipe lookup (#345)

This commit is contained in:
miozune authored and GitHub committed 2023-02-05 11:27:52 +01:00
1 parent 249cb2b308
commit 3fc576b6fc
3 files changed
+18 -4

No files matched your search

@@ -1,6 +1,7 @@
package codechicken.nei.recipe;
import java.util.ArrayList;
import java.util.Arrays;
import net.minecraft.client.Minecraft;
@@ -16,7 +17,10 @@ public class GuiUsageRecipe extends GuiRecipe<IUsageHandler> {
RecipeHandlerQuery<IUsageHandler> recipeQuery = new RecipeHandlerQuery<>(
h -> getUsageOrCatalystHandler(h, inputId, ingredients),
usagehandlers,
serialUsageHandlers);
serialUsageHandlers,
"Error while looking up usage recipe",
"inputId: " + inputId,
"ingredients: " + Arrays.toString(ingredients));
ArrayList<IUsageHandler> handlers = recipeQuery.runWithProfiling("recipe.concurrent.usage");
if (handlers.isEmpty()) return false;