diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-08-05 19:32:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 19:32:49 +0200 |
commit | 16754e3b4478eff74611579403a56993126e870f (patch) | |
tree | c659096052c46f6fba76bc37fc4f20d7729c45ed /src/Java/gtPlusPlus/xmod/gregtech/api/gui | |
parent | 2008cb4b492c3f7304a86cda360677b0722813d6 (diff) | |
parent | c1e044d6fbe73b54a9d1a0055ebb2d276519ff43 (diff) | |
download | GT5-Unofficial-16754e3b4478eff74611579403a56993126e870f.tar.gz GT5-Unofficial-16754e3b4478eff74611579403a56993126e870f.tar.bz2 GT5-Unofficial-16754e3b4478eff74611579403a56993126e870f.zip |
Merge pull request #18 from D-Cysteine/delete-super-buffer
Delete ThreadedSuperBuffer
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java | 86 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java | 32 |
2 files changed, 0 insertions, 118 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 deleted file mode 100644 index 265742e5ad..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_ThreadedSuperBuffer.java +++ /dev/null @@ -1,86 +0,0 @@ -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; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.inventory.IInventory; -import gregtech.api.gui.GT_Slot_Holo; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -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) { - this.addSlotToContainer((Slot) new GT_Slot_Holo((IInventory) this.mTileEntity, 256, 8, 63, false, true, 1)); - this.addSlotToContainer((Slot) new GT_Slot_Holo((IInventory) this.mTileEntity, 256, 26, 63, false, true, 1)); - this.addSlotToContainer((Slot) new GT_Slot_Holo((IInventory) this.mTileEntity, 256, 44, 63, false, true, 1)); - } - - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, - final EntityPlayer aPlayer) { - if (aSlotIndex < 0) { - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - final Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); - if (tSlot != null) { - if (this.mTileEntity.getMetaTileEntity() == null) { - return null; - } - if (aSlotIndex == 0) { - ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bOutput = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bOutput; - if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); - } - return null; - } - if (aSlotIndex == 1) { - ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bRedstoneIfFull = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bRedstoneIfFull; - if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); - } - return null; - } - if (aSlotIndex == 2) { - ((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bInvert = !((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity - .getMetaTileEntity()).bInvert; - if (((GT_MetaTileEntity_ThreadedChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone"); - } - return null; - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - public int getSlotCount() { - return 0; - } - - public int getShiftClickSlotCount() { - return 0; - } -}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java deleted file mode 100644 index 2ca0b25e23..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_ThreadedSuperBuffer.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -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(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; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -}
\ No newline at end of file |