Crafting CPUs can now by default perform 1 delivery per 3 ticks, and Co-Processors add to this.
This commit is contained in:
parent
aebadc3829
commit
36162baf9f
1 changed files with 21 additions and 5 deletions
|
@ -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;
|
||||
|
||||
if ( remainingOperations > 0 )
|
||||
{
|
||||
do
|
||||
{
|
||||
didsomething = false;
|
||||
executeCrafting( eg, cc );
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue