Crafting CPUs can now by default perform 1 delivery per 3 ticks, and Co-Processors add to this.

This commit is contained in:
AlgorithmX2 2014-09-06 00:31:36 -05:00
parent aebadc3829
commit 36162baf9f

View file

@ -76,6 +76,8 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
boolean waiting = false;
private boolean isComplete = true;
int usedOps[] = new int[3];
Map<ICraftingPatternDetails, TaskProgress> tasks = new HashMap<ICraftingPatternDetails, TaskProgress>();
IItemList<IAEItemStack> waitingFor = AEApi.instance().storage().createItemList();
@ -539,14 +541,21 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( waiting || tasks.isEmpty() ) // nothing to do here...
return;
remainingOperations = accelerator + 1;
remainingOperations = accelerator + 1 - (usedOps[0] + usedOps[1] + usedOps[2]);
int started = remainingOperations;
do
if ( remainingOperations > 0 )
{
didsomething = false;
executeCrafting( eg, cc );
do
{
didsomething = false;
executeCrafting( eg, cc );
}
while (didsomething && remainingOperations > 0);
}
while (didsomething && remainingOperations > 0);
usedOps[2] = usedOps[1];
usedOps[1] = usedOps[0];
usedOps[0] = started - remainingOperations;
if ( remainingOperations > 0 && didsomething == false )
waiting = true;
@ -1091,4 +1100,11 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
return wat != null && wat.getStackSize() > 0;
}
public void breakCluster()
{
TileCraftingTile t = getCore();
if ( t != null )
t.breakCluster();
}
}