diff options
author | Blood Asp <Blood@Asp> | 2015-04-26 02:04:07 +0200 |
---|---|---|
committer | Blood Asp <Blood@Asp> | 2015-04-26 02:04:07 +0200 |
commit | f1610b1721ed22fcbd4cafb61b0867d8611c00f6 (patch) | |
tree | 8261a571accdd074239edd332398c37b01c77258 /main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java | |
parent | 6b80bc2d1cb91bc377a0e549bfffaf3fe7ae08c1 (diff) | |
download | GT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.tar.gz GT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.tar.bz2 GT5-Unofficial-f1610b1721ed22fcbd4cafb61b0867d8611c00f6.zip |
Fusion GUI and Distillation Tower
Diffstat (limited to 'main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java')
-rw-r--r-- | main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java new file mode 100644 index 0000000000..83e25cfe42 --- /dev/null +++ b/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -0,0 +1,51 @@ +package gregtech.common.gui; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; +import net.minecraft.entity.player.InventoryPlayer; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; + +public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + + public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { + super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), RES_PATH_GUI + "multimachines/" + (aTextureFile==null?"MultiblockDisplay":aTextureFile)); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 8, -10, 16448255); + + if (mContainer != null) { + if ((((GT_Container_MultiMachine)mContainer).mDisplayErrorCode & 64) != 0) fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255); + + if (((GT_Container_MultiMachine)mContainer).mDisplayErrorCode == 0) { + if (((GT_Container_MultiMachine)mContainer).mActive == 0) { + fontRendererObj.drawString("Hit with Rubber Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); + } else { + fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255); + } + } + if(this.mContainer!=null){ + fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergy)+" EU", 50, 155, 0x00b0b000); + } + } + } + + @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); + if (this.mContainer != null) + { + double tScale = (double) this.mContainer.mEnergy / (double)this.mContainer.mStorage; + drawTexturedModalRect(x + 5, y + 156, 0, 251,Math.min(147, (int)(tScale*148)), 5); + } + } +}
\ No newline at end of file |