From 8867c358b44d3c4c4ecf1f95250f8e9974d791c2 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 2 Jul 2015 02:04:51 +0200 Subject: [PATCH] Derping is my speciality! Fixed everything for 0.0.6.3! --- .../inventory/ContainerFurnaceDouble.java | 7 +++---- .../actuallyadditions/inventory/gui/GuiCanolaPress.java | 5 ++--- .../actuallyadditions/inventory/gui/GuiCoalGenerator.java | 3 +-- .../actuallyadditions/inventory/gui/GuiCoffeeMachine.java | 5 ++--- .../actuallyadditions/inventory/gui/GuiEnergizer.java | 5 ++--- .../actuallyadditions/inventory/gui/GuiEnervator.java | 3 +-- .../actuallyadditions/inventory/gui/GuiFurnaceDouble.java | 5 ++--- .../actuallyadditions/inventory/gui/GuiGrinder.java | 5 ++--- .../actuallyadditions/inventory/gui/GuiOilGenerator.java | 3 +-- .../actuallyadditions/inventory/gui/GuiRepairer.java | 5 ++--- 10 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java index 3ef872724..be63827e3 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java @@ -13,7 +13,6 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.common.util.ForgeDirection; @InventoryContainer public class ContainerFurnaceDouble extends Container{ @@ -49,7 +48,7 @@ public class ContainerFurnaceDouble extends Container{ iCraft.sendProgressBarUpdate(this, 0, this.tileFurnace.firstSmeltTime); iCraft.sendProgressBarUpdate(this, 1, this.tileFurnace.secondSmeltTime); iCraft.sendProgressBarUpdate(this, 2, this.tileFurnace.maxBurnTime); - iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN)); + iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.storage.getEnergyStored()); } @Override @@ -61,13 +60,13 @@ public class ContainerFurnaceDouble extends Container{ if(this.lastFirstCrushTime != this.tileFurnace.firstSmeltTime) iCraft.sendProgressBarUpdate(this, 0, this.tileFurnace.firstSmeltTime); if(this.lastSecondCrushTime != this.tileFurnace.secondSmeltTime) iCraft.sendProgressBarUpdate(this, 1, this.tileFurnace.secondSmeltTime); if(this.lastBurnTime != this.tileFurnace.maxBurnTime) iCraft.sendProgressBarUpdate(this, 2, this.tileFurnace.maxBurnTime); - if(this.lastEnergy != this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN)) iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN)); + if(this.lastEnergy != this.tileFurnace.storage.getEnergyStored()) iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.storage.getEnergyStored()); } this.lastFirstCrushTime = this.tileFurnace.firstSmeltTime; this.lastSecondCrushTime = this.tileFurnace.secondSmeltTime; this.lastBurnTime = this.tileFurnace.maxBurnTime; - this.lastEnergy = this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN); + this.lastEnergy = this.tileFurnace.storage.getEnergyStored(); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java index e1faefd02..47c0a3cbb 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java @@ -10,7 +10,6 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -44,7 +43,7 @@ public class GuiCanolaPress extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.press.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.press.storage.getEnergyStored() > 0){ int i = this.press.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft + 43, this.guiTop+89-i, 176, 29, 16, i); } @@ -63,7 +62,7 @@ public class GuiCanolaPress extends GuiContainer{ @Override public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text1 = this.press.storage.getEnergyStored() + "/" + this.press.storage.getEnergyStored() + " RF"; + String text1 = this.press.storage.getEnergyStored() + "/" + this.press.storage.getMaxEnergyStored() + " RF"; if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ this.func_146283_a(Collections.singletonList(text1), x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java index 4aeb98b65..7df576dec 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -43,7 +42,7 @@ public class GuiCoalGenerator extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.generator.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.generator.storage.getEnergyStored() > 0){ int i = this.generator.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java index da4ce43a8..1abf2468c 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java @@ -16,7 +16,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import org.lwjgl.opengl.GL11; @@ -74,7 +73,7 @@ public class GuiCoffeeMachine extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.machine.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.machine.storage.getEnergyStored() > 0){ int i = this.machine.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+17, this.guiTop+89-i, 176, 0, 6, i); } @@ -101,7 +100,7 @@ public class GuiCoffeeMachine extends GuiContainer{ public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text1 = this.machine.storage.getEnergyStored() + "/" + this.machine.storage.getEnergyStored() + " RF"; + String text1 = this.machine.storage.getEnergyStored() + "/" + this.machine.storage.getMaxEnergyStored() + " RF"; if(x >= guiLeft+16 && y >= guiTop+5 && x <= guiLeft+23 && y <= guiTop+89){ this.func_146283_a(Collections.singletonList(text1), x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java index 685aa1bfd..9fd9976eb 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -43,7 +42,7 @@ public class GuiEnergizer extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.energizer.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.energizer.storage.getEnergyStored() > 0){ int i = this.energizer.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i); } @@ -52,7 +51,7 @@ public class GuiEnergizer extends GuiContainer{ @Override public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text1 = this.energizer.storage.getEnergyStored() + "/" + this.energizer.storage.getEnergyStored() + " RF"; + String text1 = this.energizer.storage.getEnergyStored() + "/" + this.energizer.storage.getMaxEnergyStored() + " RF"; if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){ this.func_146283_a(Collections.singletonList(text1), x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java index 800d72c70..e6f367f34 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -43,7 +42,7 @@ public class GuiEnervator extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.enervator.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.enervator.storage.getEnergyStored() > 0){ int i = this.enervator.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java index 7092ba021..7ac5f490c 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -42,7 +41,7 @@ public class GuiFurnaceDouble extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.tileFurnace.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.tileFurnace.storage.getEnergyStored() > 0){ int i = this.tileFurnace.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i); } @@ -59,7 +58,7 @@ public class GuiFurnaceDouble extends GuiContainer{ @Override public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text = this.tileFurnace.storage.getEnergyStored() + "/" + this.tileFurnace.storage.getEnergyStored() + " RF"; + String text = this.tileFurnace.storage.getEnergyStored() + "/" + this.tileFurnace.storage.getMaxEnergyStored() + " RF"; if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){ this.func_146283_a(Collections.singletonList(text), x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java index 4150e45c9..4ac9f9597 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -45,7 +44,7 @@ public class GuiGrinder extends GuiContainer{ this.mc.getTextureManager().bindTexture(this.isDouble ? resLocDouble : resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.tileGrinder.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.tileGrinder.storage.getEnergyStored() > 0){ int i = this.tileGrinder.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft + (isDouble ? 14 : 43), this.guiTop+89-i, 176, (isDouble ? 44 : 23), 16, i); } @@ -64,7 +63,7 @@ public class GuiGrinder extends GuiContainer{ @Override public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text = this.tileGrinder.storage.getEnergyStored() + "/" + this.tileGrinder.storage.getEnergyStored() + " RF"; + String text = this.tileGrinder.storage.getEnergyStored() + "/" + this.tileGrinder.storage.getMaxEnergyStored() + " RF"; if((this.isDouble && x >= guiLeft+14 && y >= guiTop+6 && x <= guiLeft+29 && y <= guiTop+88) || (!this.isDouble && x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88)){ this.func_146283_a(Collections.singletonList(text), x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java index 73cbb3486..b74e80162 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java @@ -10,7 +10,6 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -44,7 +43,7 @@ public class GuiOilGenerator extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.generator.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.generator.storage.getEnergyStored() > 0){ int i = this.generator.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java index 9a14e1edb..d91f0aab7 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java @@ -9,7 +9,6 @@ import ellpeck.actuallyadditions.util.AssetUtil; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import java.util.Collections; @@ -42,7 +41,7 @@ public class GuiRepairer extends GuiContainer{ this.mc.getTextureManager().bindTexture(resLoc); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - if(this.tileRepairer.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + if(this.tileRepairer.storage.getEnergyStored() > 0){ int i = this.tileRepairer.getEnergyScaled(83); drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i); } @@ -55,7 +54,7 @@ public class GuiRepairer extends GuiContainer{ @Override public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); - String text = this.tileRepairer.storage.getEnergyStored() + "/" + this.tileRepairer.storage.getEnergyStored() + " RF"; + String text = this.tileRepairer.storage.getEnergyStored() + "/" + this.tileRepairer.storage.getMaxEnergyStored() + " RF"; if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){ this.func_146283_a(Collections.singletonList(text), x, y); }