diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-11-06 19:32:27 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-11-06 19:32:27 +1000 |
commit | cbe0e497be8e466c380a5b4fa781b314ede9ada3 (patch) | |
tree | b85848b432adf458e3abda466ee46d9dfc3e454b /src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java | |
parent | c40416b036c0e89451e1558253ccf07bbee028d0 (diff) | |
download | GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.gz GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.bz2 GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.zip |
Revert "$ Cleaned up the entire project."
This reverts commit 0669f5eb9d5029a8b94ec552171b0837605f7747.
# Conflicts:
# src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
# src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
Revert "% Cleaned up Imports."
This reverts commit 3654052fb63a571c5eaca7f20714b87c17f7e966.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java | 110 |
1 files changed, 51 insertions, 59 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java index 82baddc05c..f7101e5ae4 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java @@ -1,5 +1,6 @@ package gtPlusPlus.xmod.gregtech.api.gui; + import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gtPlusPlus.core.lib.CORE; @@ -10,71 +11,62 @@ import net.minecraft.entity.player.InventoryPlayer; * <p/> * The GUI-Container I use for all my Basic Machines * <p/> - * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs - * I needed to produce some dummy-classes which extend this class + * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class */ public class GUI_MatterFab extends GT_GUIContainerMetaTile_Machine { - String mName = ""; - int uuaUsed = 0; - int uumMade = 0; + String mName = ""; + int uuaUsed = 0; + int uumMade = 0; - public GUI_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, - final String aName, final String aTextureFile) { - super(new CONTAINER_MatterFab(aInventoryPlayer, aTileEntity), - CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName; - } + public GUI_MatterFab(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { + super(new CONTAINER_MatterFab(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + mName = aName; + } - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 10, 8, 16448255); + + - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 10, 8, 16448255); + if (mContainer != null) { + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 1) != 0) + fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 2) != 0) + fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 4) != 0) + fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 8) != 0) + fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 16) != 0) + fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 32) != 0) + fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); + if ((((CONTAINER_MatterFab) mContainer).mDisplayErrorCode & 64) != 0) + fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); - if (this.mContainer != null) { - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 1) != 0) { - this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 2) != 0) { - this.fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 4) != 0) { - this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 8) != 0) { - this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 16) != 0) { - this.fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 32) != 0) { - this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 64) != 0) { - this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); - } + if (((CONTAINER_MatterFab) mContainer).mDisplayErrorCode == 0) { + if (((CONTAINER_MatterFab) mContainer).mActive == 0) { + fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); + fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); + fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); + } else { + uuaUsed = ((CONTAINER_MatterFab) mContainer).mUUA_USED; + uumMade = ((CONTAINER_MatterFab) mContainer).mUUM_MADE; + fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); + fontRendererObj.drawString("UU-Amplifier Used: "+uuaUsed, 10, 24, 16448255); + fontRendererObj.drawString("UU-Matter Fabricated: "+uumMade, 10, 32, 16448255); + } + } + } + } - if (((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode == 0) { - if (((CONTAINER_MatterFab) this.mContainer).mActive == 0) { - this.fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); - this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); - this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); - } - else { - this.uuaUsed = ((CONTAINER_MatterFab) this.mContainer).mUUA_USED; - this.uumMade = ((CONTAINER_MatterFab) this.mContainer).mUUM_MADE; - this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); - this.fontRendererObj.drawString("UU-Amplifier Used: " + this.uuaUsed, 10, 24, 16448255); - this.fontRendererObj.drawString("UU-Matter Fabricated: " + this.uumMade, 10, 32, 16448255); - } - } - } - } + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } } |