Fixed transfer issue
This commit is contained in:
parent
d6ad61114e
commit
198305ff39
4 changed files with 18 additions and 6 deletions
|
@ -200,9 +200,9 @@ public class GasNetwork extends DynamicNetwork<IGasHandler, GasNetwork>
|
|||
}
|
||||
|
||||
@Override
|
||||
public void tick()
|
||||
public void onUpdate()
|
||||
{
|
||||
super.tick();
|
||||
super.onUpdate();
|
||||
|
||||
if(FMLCommonHandler.instance().getEffectiveSide().isServer())
|
||||
{
|
||||
|
|
|
@ -118,6 +118,8 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
@Override
|
||||
public void tick()
|
||||
{
|
||||
boolean didFix = false;
|
||||
|
||||
if(!fixed)
|
||||
{
|
||||
ticksSinceCreate++;
|
||||
|
@ -126,9 +128,18 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
{
|
||||
ticksSinceCreate = 0;
|
||||
fixMessedUpNetwork(transmitters.iterator().next());
|
||||
didFix = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!didFix)
|
||||
{
|
||||
onUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
if(FMLCommonHandler.instance().getEffectiveSide().isServer())
|
||||
{
|
||||
Iterator<DelayQueue> i = updateQueue.iterator();
|
||||
|
|
|
@ -14,6 +14,7 @@ import mekanism.api.energy.IStrictEnergyAcceptor;
|
|||
import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.IGridTransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.api.transmitters.TransmitterNetworkRegistry;
|
||||
import mekanism.common.util.CableUtils;
|
||||
import mekanism.common.util.ListUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
@ -379,9 +380,9 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
|
|||
}
|
||||
|
||||
@Override
|
||||
public void tick()
|
||||
public void onUpdate()
|
||||
{
|
||||
super.tick();
|
||||
super.onUpdate();
|
||||
|
||||
clearJoulesTransmitted();
|
||||
|
||||
|
|
|
@ -202,9 +202,9 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
|||
}
|
||||
|
||||
@Override
|
||||
public void tick()
|
||||
public void onUpdate()
|
||||
{
|
||||
super.tick();
|
||||
super.onUpdate();
|
||||
|
||||
if(FMLCommonHandler.instance().getEffectiveSide().isServer())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue