Fix autocraft crash when started from the recipe screen (#1108)

This commit is contained in:
slprime authored and GitHub committed 2026-11-06 00:31:19 +02:00
1 parent 030795e3c7
commit acacd13bd9
2 files changed
+6

No files matched your search

@@ -123,6 +123,11 @@ public class AutoCraftingManager {
AutoCraftingManager.math = math;
if (AutoCraftingManager.math != null) {
if (NEIClientUtils.getGuiContainer() instanceof GuiRecipe<?>gui && gui.firstGui != null) {
gui.mc.displayGuiScreen(gui.firstGui);
}
ItemPanels.bookmarkPanel.clearTooltips();
math.createMasterRoot();
task.restart();
@@ -149,6 +149,7 @@ public class RecipeHandlerRef {
if (overlayHandler != null && overlayHandler.canCraft(firstGui, this.handler, this.recipeIndex)) {
if (!firstGui.equals(firstGui.mc.currentScreen)) {
if (!firstGui.mc.func_152345_ab()) return false;
firstGui.mc.displayGuiScreen(firstGui);
}