Turbines and Oil Drilling rig now show missing items in GUI

This commit is contained in:
Blood-Asp 2016-10-19 21:57:53 +02:00
parent 6d338c1d1d
commit 00d19d70be

View file

@ -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);
}
}
}
}
}