From a6bb1b33da251f4a2ec7a6d6facb4864e9905341 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Fri, 20 Jan 2017 02:07:40 +1000 Subject: + Added a power cost of 32eu/action for the Tree Farmer. (Will eventually get a config option). % Moved the internal power buffer variable out of the cut method into the class. % Massive project tidy up, lots of old unused code removed or tidied up. $ Fixed lots of String comparisons that used == instead of .equals(). $ Fixed Double/Triple/Quad null checks in certain places. $ Fixed returns that set values at the same time. $ Swapped 3.14 and 1.57 to Math.PI and Math.PI/2. $ Fixed possible cases where a NPE may be thrown, by calling logging outside of null checks. + Added PI to CORE.java, since it's a double and MC uses it as a float in each instance. - Stripped 95% of the useless code out of Meta_GT_Proxy.java --- .../gtPlusPlus/core/gui/machine/GUI_Charger.java | 50 ---------------------- src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java | 50 ---------------------- 2 files changed, 100 deletions(-) delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java (limited to 'src/Java/gtPlusPlus/core/gui/machine') diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java deleted file mode 100644 index c1f687c554..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Charger.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import gtPlusPlus.core.container.Container_Charger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityCharger; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -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 deleted file mode 100644 index 09b2ee93d8..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_NHG.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import gtPlusPlus.core.container.Container_NHG; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityNHG; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -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 -- cgit