dont try to re-request craft immediately, if we cant craft it now

This commit is contained in:
Salomão
2020-10-20 23:00:37 -03:00
parent 535289e694
commit 81df58afa5
@@ -46,6 +46,7 @@ public class MultiCraftingTracker
private Future<ICraftingJob>[] jobs = null;
private ICraftingLink[] links = null;
private int failedCraftTriesSlot[] = {0,0,0,0,0,0,0,0,0};
public MultiCraftingTracker( final ICraftingRequester o, final int size )
{
@@ -130,10 +131,14 @@ public class MultiCraftingTracker
if( this.getLink( x ) == null )
{
final IAEItemStack aisC = ais.copy();
aisC.setStackSize( itemToCraft );
this.setJob( x, cg.beginCraftingJob( w, g, mySrc, aisC, null ) );
if (this.failedCraftTriesSlot[x] == 0) {
aisC.setStackSize(itemToCraft);
this.setJob(x, cg.beginCraftingJob(w, g, mySrc, aisC, null));
}
if (getJob(x) != null) this.failedCraftTriesSlot[x] = 0;
else this.failedCraftTriesSlot[x] += 2;
}
this.failedCraftTriesSlot[x] += 2;
}
}
return false;