From 17119fd99056de450961b25f7eb6e35cd6a31c2b Mon Sep 17 00:00:00 2001 From: PrototypeTrousers Date: Fri, 10 Feb 2023 06:28:44 -0300 Subject: [PATCH] more gui fixes... --- .../implementations/ContainerCraftConfirm.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java index cf06bf389..a7d263b5b 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftConfirm.java @@ -38,6 +38,7 @@ import appeng.api.storage.data.IItemList; import appeng.client.gui.implementations.GuiCraftConfirm; import appeng.container.AEBaseContainer; import appeng.container.guisync.GuiSync; +import appeng.container.interfaces.IInventorySlotAware; import appeng.core.AELog; import appeng.core.sync.GuiBridge; import appeng.core.sync.network.NetworkHandler; @@ -306,7 +307,14 @@ public class ContainerCraftConfirm extends AEBaseContainer { this.setAutoStart(false); if (g != null && originalGui != null && this.getOpenContext() != null) { final TileEntity te = this.getOpenContext().getTile(); - Platform.openGUI(this.getInventoryPlayer().player, te, this.getOpenContext().getSide(), originalGui); + if (te != null) { + Platform.openGUI(this.getInventoryPlayer().player, te, this.getOpenContext().getSide(), originalGui); + } else { + if (ah instanceof IInventorySlotAware) { + IInventorySlotAware i = ((IInventorySlotAware) ah); + Platform.openGUI(this.getInventoryPlayer().player, i.getInventorySlot(), originalGui, i.isBaubleSlot()); + } + } } } }