From 841032a7846d4a27592a05c0d1cc730c7d5b2168 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Tue, 3 Sep 2013 00:13:58 -0400 Subject: [PATCH] fixed network connection issue As bad as it looked it came down to an hour of work to find that super.cleanUpMembers() was removed by mistake. --- .../dark/assembly/common/machine/NetworkAssembly.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/minecraft/dark/assembly/common/machine/NetworkAssembly.java b/src/minecraft/dark/assembly/common/machine/NetworkAssembly.java index eb902f14f..d480c6b9d 100644 --- a/src/minecraft/dark/assembly/common/machine/NetworkAssembly.java +++ b/src/minecraft/dark/assembly/common/machine/NetworkAssembly.java @@ -10,12 +10,13 @@ import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.block.IElectrical; import universalelectricity.core.block.IElectricalStorage; import universalelectricity.core.vector.Vector3; -import dark.core.tile.network.NetworkSharedPower; import dark.interfaces.INetworkEnergyPart; import dark.interfaces.INetworkPart; +import dark.prefab.tilenetwork.NetworkSharedPower; public class NetworkAssembly extends NetworkSharedPower { + public static final int damandUpdateDelay = 100; /** Set of tiles that count as power sources */ private Set powerSources = new HashSet(); /** Set of tiles that count as power loads */ @@ -60,7 +61,10 @@ public class NetworkAssembly extends NetworkSharedPower { lastTime = time; } - + if(time - lastTime < damandUpdateDelay) + { + return lastDemand; + } currentDemand += getNetworkPartsDemand(); Iterator it = this.powerLoads.iterator(); while (it.hasNext()) @@ -199,6 +203,7 @@ public class NetworkAssembly extends NetworkSharedPower @Override public void cleanUpMembers() { + super.cleanUpMembers(); Iterator it = powerSources.iterator(); for (int set = 0; set < 2; set++) {