Crafting CPUs can now by default perform 1 delivery per 3 ticks, and Co-Processors add to this.
This commit is contained in:
@@ -76,6 +76,8 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
|
|
||||||
boolean waiting = false;
|
boolean waiting = false;
|
||||||
private boolean isComplete = true;
|
private boolean isComplete = true;
|
||||||
|
int usedOps[] = new int[3];
|
||||||
|
|
||||||
Map<ICraftingPatternDetails, TaskProgress> tasks = new HashMap<ICraftingPatternDetails, TaskProgress>();
|
Map<ICraftingPatternDetails, TaskProgress> tasks = new HashMap<ICraftingPatternDetails, TaskProgress>();
|
||||||
IItemList<IAEItemStack> waitingFor = AEApi.instance().storage().createItemList();
|
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...
|
if ( waiting || tasks.isEmpty() ) // nothing to do here...
|
||||||
return;
|
return;
|
||||||
|
|
||||||
remainingOperations = accelerator + 1;
|
remainingOperations = accelerator + 1 - (usedOps[0] + usedOps[1] + usedOps[2]);
|
||||||
|
int started = remainingOperations;
|
||||||
|
|
||||||
do
|
if ( remainingOperations > 0 )
|
||||||
{
|
{
|
||||||
didsomething = false;
|
do
|
||||||
executeCrafting( eg, cc );
|
{
|
||||||
|
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 )
|
if ( remainingOperations > 0 && didsomething == false )
|
||||||
waiting = true;
|
waiting = true;
|
||||||
@@ -1091,4 +1100,11 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
return wat != null && wat.getStackSize() > 0;
|
return wat != null && wat.getStackSize() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void breakCluster()
|
||||||
|
{
|
||||||
|
TileCraftingTile t = getCore();
|
||||||
|
if ( t != null )
|
||||||
|
t.breakCluster();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user