more fixes related to tools with uses
This commit is contained in:
@@ -83,6 +83,7 @@ public abstract class CraftingStep implements ICraftingStep {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canStartProcessing(IItemStackList items, IFluidStackList fluids) {
|
public boolean canStartProcessing(IItemStackList items, IFluidStackList fluids) {
|
||||||
items = items.copy(); // So we can edit the list
|
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()) {
|
for (ItemStack stack : getToInsert()) {
|
||||||
ItemStack actualStack = items.get(stack, IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT | (pattern.isOredict() ? IComparer.COMPARE_OREDICT : 0));
|
ItemStack actualStack = items.get(stack, IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT | (pattern.isOredict() ? IComparer.COMPARE_OREDICT : 0));
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ public class CraftingStepCraft extends CraftingStep {
|
|||||||
// So we can edit the lists
|
// So we can edit the lists
|
||||||
items = items.copy();
|
items = items.copy();
|
||||||
fluids = fluids.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);
|
int compare = IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT | (pattern.isOredict() ? IComparer.COMPARE_OREDICT : 0);
|
||||||
for (ItemStack stack : getToInsert()) {
|
for (ItemStack stack : getToInsert()) {
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
@Override
|
@Override
|
||||||
public void calculate() {
|
public void calculate() {
|
||||||
IItemStackList networkList = network.getItemStorageCache().getList().copy();
|
IItemStackList networkList = network.getItemStorageCache().getList().copy();
|
||||||
|
networkList.clean(); // Remove the zero stacks
|
||||||
IItemStackList toInsert = API.instance().createItemStackList();
|
IItemStackList toInsert = API.instance().createItemStackList();
|
||||||
|
|
||||||
toCraft.add(ItemHandlerHelper.copyStackWithSize(requested, quantity));
|
toCraft.add(ItemHandlerHelper.copyStackWithSize(requested, quantity));
|
||||||
|
|||||||
Reference in New Issue
Block a user