diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java | 5 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java index 7adcfb9683..51ad334a01 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java @@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.api.gui; import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_ThreadedBuffer; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ThreadedChestBuffer; import net.minecraft.item.ItemStack; @@ -14,8 +15,12 @@ import net.minecraft.entity.player.InventoryPlayer; import gregtech.api.gui.GT_ContainerMetaTile_Machine; public class CONTAINER_ThreadedSuperBuffer extends GT_ContainerMetaTile_Machine { + + protected int cacheTime = 0; + public CONTAINER_ThreadedSuperBuffer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); + cacheTime = ((GT_MetaTileEntity_ThreadedBuffer)aTileEntity.getMetaTileEntity()).mThreadTimeLeft; } public void addSlots(final InventoryPlayer aInventoryPlayer) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java index 83e96cd85b..2ca0b25e23 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java @@ -1,15 +1,28 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; public class GUI_ThreadedSuperBuffer extends GT_GUIContainerMetaTile_Machine { + + int cacheTime = 0; + public GUI_ThreadedSuperBuffer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super((GT_ContainerMetaTile_Machine) new CONTAINER_ThreadedSuperBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/SuperBuffer.png"); + super(new CONTAINER_ThreadedSuperBuffer(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/SuperBuffer.png"); + } + + private void updateVars(){ + this.cacheTime = ((CONTAINER_ThreadedSuperBuffer)this.mContainer).cacheTime; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2){ + this.updateVars(); + this.fontRendererObj.drawString("Time Remaining: "+cacheTime, 76, 61, 4210752); } + @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; |