diff options
author | â€huajijam <strhuaji@gmail.com> | 2019-05-17 23:26:41 +0800 |
---|---|---|
committer | â€huajijam <strhuaji@gmail.com> | 2019-05-17 23:26:41 +0800 |
commit | 5920c6db3ff62d89ba41db4eda59cc6d70ddce3b (patch) | |
tree | d4d6d5036e8cb95d2232066f0ee257f59b5aa967 /src/Java/gtPlusPlus/xmod/gregtech/api/gui | |
parent | 787c31758d2ea3259f8da9c5c7ffd4b28429eb9a (diff) | |
parent | cacc2915ef0039e3460817e4f116d44cf8e44e5f (diff) | |
download | GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.tar.gz GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.tar.bz2 GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.zip |
Automatic synchronization
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui')
3 files changed, 100 insertions, 8 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..721fe053ae --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java @@ -0,0 +1,51 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.slots.SlotAirFilter; +import net.minecraft.entity.player.InventoryPlayer; + + +public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine { + + public long maxEU = 0; + public long storedEU = 0; + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 1, 80, 35)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } + + @Override + public void updateProgressBar(final int id, final int value) { + super.updateProgressBar(id, value); + switch (id) { + default: + break; + } + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + } + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java index 503b36e157..dcab57c380 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java @@ -4,21 +4,16 @@ import java.util.Iterator; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Output; import gregtech.api.gui.GT_Slot_Render; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.core.slots.SlotLockedInput; -import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..4b998f6487 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java @@ -0,0 +1,46 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + long maxPower = 0; + long storedPower = 0; + + public GUI_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 8, 8, 16448255); + /* + * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean + * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle"); + * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18, + * 16448255); + */ + if (this.mContainer != null) { + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + 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); + } +} |