This commit is contained in:
PrototypeTrousers
2022-03-03 14:06:11 -03:00
parent d414c458ae
commit eea5bc7c6b
2 changed files with 8 additions and 2 deletions
@@ -58,6 +58,7 @@ public class CraftingJob implements Runnable, ICraftingJob
private final IItemList<IAEItemStack> crafting = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final IItemList<IAEItemStack> missing = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final IItemList<IAEItemStack> usedWhileBuilding = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final IItemList<IAEItemStack> uniques = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final HashMap<String, TwoIntegers> opsAndMultiplier = new HashMap<>();
private final Object monitor = new Object();
@@ -110,9 +111,9 @@ public class CraftingJob implements Runnable, ICraftingJob
return usedWhileBuilding;
}
public IAEItemStack getOriginal( IAEItemStack request )
public IItemList<IAEItemStack> getUniques()
{
return original.getItemList().findPrecise( request );
return uniques;
}
IAEItemStack checkUse( final IAEItemStack available )
@@ -345,6 +345,11 @@ public class CraftingTreeNode
throw new CraftBranchFailure( this.what, l );
}
boolean notRecursive()
{
return job.getUniques().findPrecise( this.what ) == null || this.parent == null;
}
void dive( final CraftingJob job )
{
if( this.missing > 0 )