more fixes related to tools with uses

This commit is contained in:
way2muchnoise
2016-10-23 16:41:02 +02:00
parent 1ddc958e5f
commit 681d47c5d7
3 changed files with 5 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ public abstract class CraftingStep implements ICraftingStep {
@Override
public boolean canStartProcessing(IItemStackList items, IFluidStackList fluids) {
items = items.copy(); // So we can edit the list
items.clean();// Clean the list so the zero stacks aren't there
for (ItemStack stack : getToInsert()) {
ItemStack actualStack = items.get(stack, IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT | (pattern.isOredict() ? IComparer.COMPARE_OREDICT : 0));

View File

@@ -30,6 +30,9 @@ public class CraftingStepCraft extends CraftingStep {
// So we can edit the lists
items = items.copy();
fluids = fluids.copy();
// Clean the lists so the zero stacks aren't there
items.clean();
fluids.clear();
int compare = IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT | (pattern.isOredict() ? IComparer.COMPARE_OREDICT : 0);
for (ItemStack stack : getToInsert()) {

View File

@@ -73,6 +73,7 @@ public class CraftingTask implements ICraftingTask {
@Override
public void calculate() {
IItemStackList networkList = network.getItemStorageCache().getList().copy();
networkList.clean(); // Remove the zero stacks
IItemStackList toInsert = API.instance().createItemStackList();
toCraft.add(ItemHandlerHelper.copyStackWithSize(requested, quantity));