mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 11:59:17 +00:00
Fix autocraft crash when started from the recipe screen (#1108)
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user