diff --git a/common/mekanism/common/EnergyNetwork.java b/common/mekanism/common/EnergyNetwork.java index 5feafadf2..23a1f1afd 100644 --- a/common/mekanism/common/EnergyNetwork.java +++ b/common/mekanism/common/EnergyNetwork.java @@ -56,7 +56,7 @@ public class EnergyNetwork extends DynamicNetwork public static double round(double d) { - return Math.round(d * 100)/100; + return Math.round(d * 10000)/10000; } public EnergyNetwork(Set networks) @@ -73,7 +73,6 @@ public class EnergyNetwork extends DynamicNetwork lastPowerScale = net.lastPowerScale; } - System.out.println("ADDING " + net.electricityStored); electricityStored += net.electricityStored; addAllTransmitters(net.transmitters); @@ -105,7 +104,6 @@ public class EnergyNetwork extends DynamicNetwork { if(FMLCommonHandler.instance().getEffectiveSide().isServer()) { - System.out.println("--start--"); double[] caps = new double[networks.size()]; double cap = 0; @@ -115,19 +113,14 @@ public class EnergyNetwork extends DynamicNetwork cap += network.getCapacity(); } - System.out.println("capping at: " + cap); electricityStored = Math.min(cap, electricityStored); double[] percent = ListUtils.percent(caps); for(EnergyNetwork network : networks) { - System.out.println(electricityStored + " " + percent[networks.indexOf(network)]); - System.out.println("Setting to " + percent[networks.indexOf(network)]*electricityStored); - network.electricityStored = percent[networks.indexOf(network)]*electricityStored; + network.electricityStored = round(percent[networks.indexOf(network)]*electricityStored); } - - System.out.println("--end--"); } } @@ -441,13 +434,7 @@ public class EnergyNetwork extends DynamicNetwork if(electricityStored > 0) { - double emitted = electricityStored - tickEmit(electricityStored); - electricityStored -= emitted; - - if(emitted > 0) - { - System.out.println(emitted); - } + electricityStored -= (electricityStored - tickEmit(electricityStored)); } } } @@ -477,7 +464,6 @@ public class EnergyNetwork extends DynamicNetwork network.joulesTransmitted = joulesTransmitted; network.lastPowerScale = lastPowerScale; network.electricityStored += electricityStored; - System.out.println("VAR ADDING " + electricityStored); return network; } @@ -490,7 +476,6 @@ public class EnergyNetwork extends DynamicNetwork network.joulesTransmitted = joulesTransmitted; network.lastPowerScale = lastPowerScale; network.electricityStored += electricityStored; - System.out.println("COLLECTION Adding " + electricityStored); return network; } diff --git a/common/mekanism/common/multipart/PartUniversalCable.java b/common/mekanism/common/multipart/PartUniversalCable.java index 9505d90af..896d8248e 100644 --- a/common/mekanism/common/multipart/PartUniversalCable.java +++ b/common/mekanism/common/multipart/PartUniversalCable.java @@ -52,7 +52,6 @@ public class PartUniversalCable extends PartTransmitter implement else { if(cacheEnergy > 0) { - System.out.println("More cache " + cacheEnergy); getTransmitterNetwork().electricityStored += cacheEnergy; cacheEnergy = 0; } @@ -74,10 +73,7 @@ public class PartUniversalCable extends PartTransmitter implement { super.save(nbtTags); - double remains = getTransmitterNetwork().electricityStored%getTransmitterNetwork().getMeanCapacity(); - double toSave = (getTransmitterNetwork().electricityStored-remains)/getTransmitterNetwork().getMeanCapacity(); - toSave = EnergyNetwork.round(toSave + remains); - System.out.println("SAVING " + toSave); + double toSave = EnergyNetwork.round(getTransmitterNetwork().electricityStored*(1F/getTransmitterNetwork().transmitters.size())); lastWrite = toSave; nbtTags.setDouble("cacheEnergy", toSave); @@ -99,7 +95,6 @@ public class PartUniversalCable extends PartTransmitter implement @Override public void preSingleMerge(EnergyNetwork network) { - System.out.println("Cache " + cacheEnergy); network.electricityStored += cacheEnergy; cacheEnergy = 0; }