diff --git a/src/main/java/techreborn/client/container/ContainerLesu.java b/src/main/java/techreborn/client/container/ContainerLesu.java index da109a0ee..fa31d104c 100644 --- a/src/main/java/techreborn/client/container/ContainerLesu.java +++ b/src/main/java/techreborn/client/container/ContainerLesu.java @@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; +import techreborn.config.ConfigTechReborn; import techreborn.tiles.lesu.TileLesu; public class ContainerLesu extends TechRebornContainer { @@ -96,7 +97,7 @@ public class ContainerLesu extends TechRebornContainer { } else if(id == 4){ this.euStorage = value; } - this.euStorage = (connectedBlocks * 100000) + 1000000000; + this.euStorage = ((connectedBlocks + 1) * ConfigTechReborn.lesuStoragePerBlock); } } diff --git a/src/main/java/techreborn/client/gui/GuiLesu.java b/src/main/java/techreborn/client/gui/GuiLesu.java index c4bfd0a25..379087c4f 100644 --- a/src/main/java/techreborn/client/gui/GuiLesu.java +++ b/src/main/java/techreborn/client/gui/GuiLesu.java @@ -47,10 +47,25 @@ public class GuiLesu extends GuiContainer { int p_146979_2_) { this.fontRendererObj.drawString(StatCollector.translateToLocal("tile.techreborn.lesu.name"), 40, 10, Color.WHITE.getRGB()); - this.fontRendererObj.drawString((int)containerLesu.euOut + " eu/tick", 10, 20, Color.WHITE.getRGB()); - this.fontRendererObj.drawString((int)containerLesu.storedEu + " eu", 10, 30, Color.WHITE.getRGB()); - this.fontRendererObj.drawString((int)containerLesu.euChange + " eu change", 10, 40, Color.WHITE.getRGB()); - this.fontRendererObj.drawString((int)containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB()); -// this.fontRendererObj.drawString((int)containerLesu.euStorage + " max eu", 10, 60, Color.WHITE.getRGB()); + this.fontRendererObj.drawString(GetEUString(containerLesu.euOut) + "/t", 10, 20, Color.WHITE.getRGB()); + this.fontRendererObj.drawString(GetEUString(containerLesu.storedEu), 10, 30, Color.WHITE.getRGB()); + this.fontRendererObj.drawString(GetEUString(containerLesu.euChange) + " change", 10, 40, Color.WHITE.getRGB()); + this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB()); + this.fontRendererObj.drawString(GetEUString(containerLesu.euStorage) + " max", 10, 60, Color.WHITE.getRGB()); } + + private String GetEUString(double euValue) + { + if (euValue >= 1000000) { + double tenX = Math.round(euValue / 100000); + return Double.toString(tenX / 10.0).concat(" m EU"); + } + else if (euValue >= 1000) { + double tenX = Math.round(euValue / 100); + return Double.toString(tenX / 10.0).concat(" k EU"); + } + else { + return Double.toString(Math.floor(euValue)).concat(" EU"); + } + } } diff --git a/src/main/java/techreborn/client/hud/ChargeHud.java b/src/main/java/techreborn/client/hud/ChargeHud.java index 2c77fac79..40ea7b138 100644 --- a/src/main/java/techreborn/client/hud/ChargeHud.java +++ b/src/main/java/techreborn/client/hud/ChargeHud.java @@ -116,7 +116,11 @@ public class ChargeHud private String GetEUString(double euValue) { - if (euValue > 1000) { + if (euValue > 1000000) { + double tenX = Math.round(euValue / 100000); + return Double.toString(tenX / 10.0).concat(" m EU"); + } + else if (euValue > 1000) { double tenX = Math.round(euValue / 100); return Double.toString(tenX / 10.0).concat(" k EU"); } diff --git a/src/main/java/techreborn/config/ConfigTechReborn.java b/src/main/java/techreborn/config/ConfigTechReborn.java index 777fce9a7..c8b343769 100644 --- a/src/main/java/techreborn/config/ConfigTechReborn.java +++ b/src/main/java/techreborn/config/ConfigTechReborn.java @@ -69,6 +69,9 @@ public class ConfigTechReborn { public static int DragoneggsiphonerOutput; public static int heatGeneratorOutput; public static int aveargeEuOutTickTime; + public static int extraOutputPerLesuBlock; + public static int baseLesuOutput; + public static int lesuStoragePerBlock; // Charge public static int AdvancedDrillCharge; public static int LapotronPackCharge; @@ -571,6 +574,22 @@ public class ConfigTechReborn { StatCollector .translateToLocal("config.techreborn.aveargeEuOutTickTime.tooltip")) .getInt(); + lesuStoragePerBlock = config.get(CATEGORY_POWER, + StatCollector.translateToLocal("config.techreborn.lesuStoragePerBlock"), + 1000000, + StatCollector.translateToLocal("config.techreborn.lesuStoragePerBlock.tooltip")) + .getInt(); + baseLesuOutput = config.get(CATEGORY_POWER, + StatCollector.translateToLocal("config.techreborn.baseLesuOutput"), + 16, + StatCollector.translateToLocal("config.techreborn.baseLesuOutput.tooltip")) + .getInt(); + extraOutputPerLesuBlock = config.get(CATEGORY_POWER, + StatCollector.translateToLocal("config.techreborn.extraOutputPerLesuBlock"), + 8, + StatCollector.translateToLocal("config.techreborn.extraOutputPerLesuBlock.tooltip")) + .getInt(); + // Teir AdvancedDrillTier = config diff --git a/src/main/java/techreborn/tiles/lesu/TileLesu.java b/src/main/java/techreborn/tiles/lesu/TileLesu.java index ce5f3026f..5bcd9af3b 100644 --- a/src/main/java/techreborn/tiles/lesu/TileLesu.java +++ b/src/main/java/techreborn/tiles/lesu/TileLesu.java @@ -11,9 +11,6 @@ import java.util.ArrayList; public class TileLesu extends EUStorageTile implements IWrenchable { - public int baseEU = 0; - public int storgeBlockSize = 1000000; - private ArrayList countedNetworks = new ArrayList(); public int connectedBlocks = 0; public int currentBlocks = 0; @@ -51,14 +48,13 @@ public class TileLesu extends EUStorageTile implements IWrenchable { } } if(currentBlocks != connectedBlocks){ - maxStorage = (connectedBlocks * storgeBlockSize) + baseEU; - output = connectedBlocks; + maxStorage = ((connectedBlocks + 1) * ConfigTechReborn.lesuStoragePerBlock); + output = (connectedBlocks * ConfigTechReborn.extraOutputPerLesuBlock) + ConfigTechReborn.baseLesuOutput; } if(ticks == ConfigTechReborn.aveargeEuOutTickTime){ euChange = -1; ticks = 0; - } else { ticks ++; if(euChange == -1){