This commit is contained in:
PrototypeTrousers
2021-08-13 23:53:03 -03:00
parent facc1b4ef4
commit e09f74cb5f
5 changed files with 8 additions and 7 deletions
@@ -384,7 +384,7 @@ public class CraftingJob implements Runnable, ICraftingJob
public void addIncompletablePattern( ICraftingPatternDetails details, IAEItemStack stack )
{
( (CraftingGridCache) cc ).getPatternDebtManager().put( details, stack );
( (CraftingGridCache) cc ).getPatternStatusManager().put( details, stack );
}
private static class TwoIntegers
@@ -65,7 +65,7 @@ public class CraftingTreeProcess
this.depth = depth;
final World world = job.getWorld();
if( !( (CraftingGridCache) cc ).getPatternDebtManager().containsIncompletablePattern( details ) && details.isCraftable() )
if( !( (CraftingGridCache) cc ).getPatternStatusManager().containsIncompletablePattern( details ) && details.isCraftable() )
{
final IAEItemStack[] list = details.getInputs();
@@ -133,10 +133,10 @@ public class MultiCraftingTracker
CraftingGridCache cgc = (CraftingGridCache) cg;
ImmutableCollection<ICraftingPatternDetails> cl = cgc.getCraftingFor( aisC, null, 0, w );
ImmutableCollection<ICraftingPatternDetails> cl = cgc.getCraftingFor( aisC, null, x, w );
for( ICraftingPatternDetails craftingPatternDetails : cl )
{
if( cgc.getPatternDebtManager().containsIncompletablePattern( craftingPatternDetails ) )
if( cgc.getPatternStatusManager().containsIncompletablePattern( craftingPatternDetails ) )
{
return false;
}
+2 -2
View File
@@ -277,7 +277,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
this.craftingMethods.clear();
this.craftableItems.clear();
this.emitableItems.clear();
( (GridStorageCache) this.storageGrid ).clearDebts();
( (GridStorageCache) this.storageGrid ).clearPatternStatus();
// re-create list..
for( final ICraftingProvider provider : this.craftingProviders )
@@ -661,7 +661,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
return this.interestManager;
}
public PatternStatusManager getPatternDebtManager()
public PatternStatusManager getPatternStatusManager()
{
return ( (GridStorageCache) this.storageGrid ).getPatternStatusManager();
}
+2 -1
View File
@@ -316,8 +316,9 @@ public class GridStorageCache implements IStorageGrid
return this.patternStatusManager;
}
public void clearDebts()
public void clearPatternStatus()
{
System.out.println( "reseting pattern status due to pattern changes" );
this.patternDetails2IAEStackMultimap.clear();
this.iaeStack2PatternDetailsMultimap.clear();
}