aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/gui/machine
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-11-06 19:32:27 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-11-06 19:32:27 +1000
commitcbe0e497be8e466c380a5b4fa781b314ede9ada3 (patch)
treeb85848b432adf458e3abda466ee46d9dfc3e454b /src/Java/gtPlusPlus/core/gui/machine
parentc40416b036c0e89451e1558253ccf07bbee028d0 (diff)
downloadGT5-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/core/gui/machine')
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java73
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java74
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java90
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java36
4 files changed, 136 insertions, 137 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
index 62e2da7420..c1f687c554 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
@@ -1,7 +1,5 @@
package gtPlusPlus.core.gui.machine;
-import org.lwjgl.opengl.GL11;
-
import gtPlusPlus.core.container.Container_Charger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityCharger;
@@ -12,40 +10,41 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
-public class GUI_Charger extends GuiContainer {
- private final ResourceLocation texture = new ResourceLocation(CORE.MODID, "textures/gui/machine_Charger.png");
-
- private final InventoryPlayer inventory;
- private final TileEntityCharger te;
-
- public GUI_Charger(final TileEntityCharger te, final EntityPlayer player) {
- super(new Container_Charger(te, player));
- this.inventory = player.inventory;
- this.te = te;
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- Minecraft.getMinecraft().renderEngine.bindTexture(this.texture);
-
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- 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);
- }
+import org.lwjgl.opengl.GL11;
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(I18n.format(this.te.getInventoryName()),
- this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format(this.te.getInventoryName())) / 2, 6,
- 4210752, false);
- // fontRendererObj.drawString(I18n.format(inventory.getInventoryName()),
- // 8, ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(I18n.format("Charge:" + this.te.getCharge() + "~"), 8, this.ySize - 96 + 2,
- 4210752);
- this.fontRendererObj.drawString(I18n.format("Progress:" + this.te.getProgress() + "ticks"), 80,
- this.ySize - 96 + 2, 4210752);
- }
+public class GUI_Charger extends GuiContainer
+{
+ private ResourceLocation texture = new ResourceLocation(CORE.MODID, "textures/gui/machine_Charger.png");
+
+ private InventoryPlayer inventory;
+ private TileEntityCharger te;
+
+ public GUI_Charger(TileEntityCharger te, EntityPlayer player)
+ {
+ super(new Container_Charger(te, player));
+ inventory = player.inventory;
+ this.te = te;
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
+ {
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+
+ drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ fontRendererObj.drawString(I18n.format(te.getInventoryName()), (xSize / 2) - (fontRendererObj.getStringWidth(I18n.format(te.getInventoryName())) / 2), 6, 4210752, false);
+ //fontRendererObj.drawString(I18n.format(inventory.getInventoryName()), 8, ySize - 96 + 2, 4210752);
+ fontRendererObj.drawString(I18n.format("Charge:"+te.getCharge()+"~"), 8, ySize - 96 + 2, 4210752);
+ fontRendererObj.drawString(I18n.format("Progress:"+te.getProgress()+"ticks"), 80, ySize - 96 + 2, 4210752);
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java
index f9346886fd..09b2ee93d8 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java
@@ -1,7 +1,5 @@
package gtPlusPlus.core.gui.machine;
-import org.lwjgl.opengl.GL11;
-
import gtPlusPlus.core.container.Container_NHG;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityNHG;
@@ -12,41 +10,41 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
-public class GUI_NHG extends GuiContainer {
- private final ResourceLocation texture = new ResourceLocation(CORE.MODID,
- "textures/gui/helium_collector_gui_12.png");
-
- private final InventoryPlayer inventory;
- private final TileEntityNHG te;
-
- public GUI_NHG(final TileEntityNHG te, final EntityPlayer player) {
- super(new Container_NHG(te, player));
- this.inventory = player.inventory;
- this.te = te;
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- Minecraft.getMinecraft().renderEngine.bindTexture(this.texture);
-
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- 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);
- }
+import org.lwjgl.opengl.GL11;
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(I18n.format(this.te.getInventoryName()),
- this.xSize / 2 - this.fontRendererObj.getStringWidth(I18n.format(this.te.getInventoryName())) / 2, 6,
- 4210752, false);
- // fontRendererObj.drawString(I18n.format(inventory.getInventoryName()),
- // 8, ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(I18n.format("CoreTemp:" + this.te.getCoreTemp() + "K"), 8, this.ySize - 96 + 2,
- 4210752);
- this.fontRendererObj.drawString(I18n.format("Progress:" + this.te.getProgress() + "ticks"), 80,
- this.ySize - 96 + 2, 4210752);
- }
+public class GUI_NHG extends GuiContainer
+{
+ private ResourceLocation texture = new ResourceLocation(CORE.MODID, "textures/gui/helium_collector_gui_12.png");
+
+ private InventoryPlayer inventory;
+ private TileEntityNHG te;
+
+ public GUI_NHG(TileEntityNHG te, EntityPlayer player)
+ {
+ super(new Container_NHG(te, player));
+ inventory = player.inventory;
+ this.te = te;
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
+ {
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+
+ drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ fontRendererObj.drawString(I18n.format(te.getInventoryName()), (xSize / 2) - (fontRendererObj.getStringWidth(I18n.format(te.getInventoryName())) / 2), 6, 4210752, false);
+ //fontRendererObj.drawString(I18n.format(inventory.getInventoryName()), 8, ySize - 96 + 2, 4210752);
+ fontRendererObj.drawString(I18n.format("CoreTemp:"+te.getCoreTemp()+"K"), 8, ySize - 96 + 2, 4210752);
+ fontRendererObj.drawString(I18n.format("Progress:"+te.getProgress()+"ticks"), 80, ySize - 96 + 2, 4210752);
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java
index ed092f14d8..86388a2632 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java
@@ -1,9 +1,5 @@
package gtPlusPlus.core.gui.machine;
-import org.lwjgl.opengl.GL11;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.container.Container_Workbench;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
@@ -12,67 +8,73 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class GUI_Workbench extends GuiContainer {
- private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID,
- "textures/gui/BronzeCraftingTable.png");
+ private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png");
+
+ public boolean moveItemsToChest = false;
+ public boolean moveItemsToCrafting = false;
- public boolean moveItemsToChest = false;
- public boolean moveItemsToCrafting = false;
-
- public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile) {
+ public GUI_Workbench(InventoryPlayer player_inventory, TileEntityWorkbench tile){
super(new Container_Workbench(player_inventory, tile));
}
+
@Override
- protected void actionPerformed(final GuiButton B) {
- // If the button id is different, or you have mrs buttons, create
- // another if block for that too!
- if (B.id == 1) {
- System.out.println("Trying to empty crafting grid to the storage compartment.");
- // moveItemsToChest = true;
- ((Container_Workbench) this.inventorySlots).moveCraftingToChest();
- }
- else if (B.id == 2) {
- System.out.println("Trying to move items into the crafting grid.");
- // moveItemsToCrafting = true;
- ((Container_Workbench) this.inventorySlots).moveChestToCrafting();
- }
+ protected void drawGuiContainerForegroundLayer(int i, int j){
+ //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752);
+ //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
+
@Override
- protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j) {
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- this.mc.renderEngine.bindTexture(GUI_Workbench.craftingTableGuiTextures);
- 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);
+ protected void drawGuiContainerBackgroundLayer(float f, int i, int j){
+ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ this.mc.renderEngine.bindTexture(craftingTableGuiTextures);
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
}
+
+ //This method is called when the Gui is first called!
@Override
- protected void drawGuiContainerForegroundLayer(final int i, final int j) {
- // this.fontRendererObj.drawString(I18n.format("Workbench", new
- // Object[0]), 28, 6, 4210752);
- // this.fontRendererObj.drawString(I18n.format("container.inventory",
- // new Object[0]), 8, this.ySize - 96 + 2, 4210752);
+ public void initGui()
+ {
+ //You have to add this line for the Gui to function properly!
+ super.initGui();
+
+ //The parameters of GuiButton are(id, x, y, width, height, text);
+ //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X"));
+ //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y"));
+ //NOTE: the id always has to be different or else it might get called twice or never!
+ //Add any other buttons here too!
}
- // This method is called when the Gui is first called!
@Override
- public void initGui() {
- // You have to add this line for the Gui to function properly!
- super.initGui();
+ protected void actionPerformed(GuiButton B)
+ {
+ //If the button id is different, or you have mrs buttons, create another if block for that too!
+ if(B.id == 1){
+ System.out.println("Trying to empty crafting grid to the storage compartment.");
+ //moveItemsToChest = true;
+ ((Container_Workbench) this.inventorySlots).moveCraftingToChest();
+ }
+ else if(B.id == 2){
+ System.out.println("Trying to move items into the crafting grid.");
+ //moveItemsToCrafting = true;
+ ((Container_Workbench) this.inventorySlots).moveChestToCrafting();
+ }
- // The parameters of GuiButton are(id, x, y, width, height, text);
- // this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X"));
- // this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y"));
- // NOTE: the id always has to be different or else it might get called
- // twice or never!
- // Add any other buttons here too!
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java
index 3b24ccb02c..5c04acf13b 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java
@@ -1,9 +1,5 @@
package gtPlusPlus.core.gui.machine;
-import org.lwjgl.opengl.GL11;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.container.Container_WorkbenchAdvanced;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced;
@@ -11,31 +7,35 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
@SideOnly(Side.CLIENT)
public class GUI_WorkbenchAdvanced extends GuiContainer {
- private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID,
- "textures/gui/AdvancedCraftingTable.png");
+ private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png");
- public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile) {
+ public GUI_WorkbenchAdvanced(InventoryPlayer player_inventory, TileEntityWorkbenchAdvanced tile){
super(new Container_WorkbenchAdvanced(player_inventory, tile));
}
+
@Override
- protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j) {
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- this.mc.renderEngine.bindTexture(GUI_WorkbenchAdvanced.craftingTableGuiTextures);
- 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);
+ protected void drawGuiContainerForegroundLayer(int i, int j){
+ //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752);
+ //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
+
@Override
- protected void drawGuiContainerForegroundLayer(final int i, final int j) {
- // this.fontRendererObj.drawString(I18n.format("Workbench", new
- // Object[0]), 28, 6, 4210752);
- // this.fontRendererObj.drawString(I18n.format("container.inventory",
- // new Object[0]), 8, this.ySize - 96 + 2, 4210752);
+ protected void drawGuiContainerBackgroundLayer(float f, int i, int j){
+ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ this.mc.renderEngine.bindTexture(craftingTableGuiTextures);
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
}
} \ No newline at end of file