Update GT_GUIContainerMetaTile_Machine

This commit is contained in:
Antifluxfield 2017-08-01 09:42:46 +08:00
parent 64957ccd0f
commit b7e0863207

View file

@ -1,15 +1,17 @@
package gregtech.api.gui; package gregtech.api.gui;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
/** /**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!! * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
* <p/> * <p/>
@ -54,13 +56,12 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin
} else { } else {
fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255); fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255);
} }
int id = mContainer.mTileEntity.getMetaTileID(); if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) {
if (id == 1157 || id == 1158 || id == 1177 || id == 1178 || id == 1179 || id == 133 || id == 134 || id == 135 || id == 136) {
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
} }
} else if (id == 1131 || id == 1151 || id == 1152 || id == 1153) { } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) {
ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) { if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) {
fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);