From 742bc2eedf456253a722f5d3e773b343a7343eb9 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 19 Oct 2016 21:57:53 +0200 Subject: [PATCH] Turbines and Oil Drilling rig now show missing items in GUI --- .../api/gui/GT_GUIContainer_MultiMachine.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java index 15213cc7..c7712124 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -1,7 +1,11 @@ package gregtech.api.gui; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; @@ -49,6 +53,18 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin } else { fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); } + int id = mContainer.mTileEntity.getMetaTileID(); + if(id == 1157 || id == 1158){ + ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); + if(tItem==null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))){ + fontRendererObj.drawString("Missing Mining Pipe", 10,((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); + } + }else if(id == 1131 || id == 1151 || id == 1152 || id == 1153){ + ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); + if(tItem==null || !(tItem.getItem()==GT_MetaGenerated_Tool_01.INSTANCE&&tItem.getItemDamage()>=170&&tItem.getItemDamage()<=177)){ + fontRendererObj.drawString("Missing Turbine Rotor", 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); + } + } } } }