aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/gui/machine
diff options
context:
space:
mode:
authordraknyte1 <draknyte1@hotmail.com>2016-11-04 15:23:26 +1000
committerdraknyte1 <draknyte1@hotmail.com>2016-11-04 15:23:26 +1000
commit0669f5eb9d5029a8b94ec552171b0837605f7747 (patch)
tree6b40e64c04d51b7a33cf2f0b35f7232cf37c4247 /src/Java/gtPlusPlus/core/gui/machine
parent3654052fb63a571c5eaca7f20714b87c17f7e966 (diff)
downloadGT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.gz
GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.bz2
GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.zip
$ Cleaned up the entire project.
> Much neat, very nices.
Diffstat (limited to 'src/Java/gtPlusPlus/core/gui/machine')
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java71
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java72
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java81
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java27
4 files changed, 127 insertions, 124 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
index 27f0dc5c04..62e2da7420 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java
@@ -12,39 +12,40 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
-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);
- }
+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);
+ }
+
+ @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);
+ }
} \ 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 acfe8fcc3b..f9346886fd 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java
@@ -12,39 +12,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 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);
- }
+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);
+ }
+
+ @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);
+ }
} \ 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 6c108312b4..ed092f14d8 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java
@@ -15,65 +15,64 @@ import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT)
public class GUI_Workbench extends GuiContainer {
- private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png");
-
- public boolean moveItemsToChest = false;
- public boolean moveItemsToCrafting = false;
+ private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID,
+ "textures/gui/BronzeCraftingTable.png");
- public GUI_Workbench(InventoryPlayer player_inventory, TileEntityWorkbench tile){
+ public boolean moveItemsToChest = false;
+ public boolean moveItemsToCrafting = false;
+
+ public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile) {
super(new Container_Workbench(player_inventory, tile));
}
-
@Override
- 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);
+ 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();
+ }
}
-
@Override
- 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);
+ 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);
}
-
- //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();
-
- //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!
+ 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);
- //Add any other buttons here too!
}
+ // This method is called when the Gui is first called!
@Override
- 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();
- }
+ 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!
}
} \ 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 34b5472f32..3b24ccb02c 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java
@@ -14,27 +14,28 @@ import net.minecraft.util.ResourceLocation;
@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(InventoryPlayer player_inventory, TileEntityWorkbenchAdvanced tile){
+ public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile) {
super(new Container_WorkbenchAdvanced(player_inventory, tile));
}
-
@Override
- 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);
+ 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);
}
-
@Override
- 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);
+ 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);
}
} \ No newline at end of file