adds fix for NPE on getting the requested stack, #556

This commit is contained in:
way2muchnoise
2016-10-31 16:37:59 +01:00
parent afd76b237e
commit cf33b2b1fb

View File

@@ -76,6 +76,7 @@ public class CraftingTask implements ICraftingTask {
IFluidStackList networkFluidList = network.getFluidStorageCache().getList().copy(); IFluidStackList networkFluidList = network.getFluidStorageCache().getList().copy();
IItemStackList toInsert = API.instance().createItemStackList(); IItemStackList toInsert = API.instance().createItemStackList();
ItemStack requested = this.requested != null ? this.requested : pattern.getOutputs().get(0);
toCraft.add(ItemHandlerHelper.copyStackWithSize(requested, quantity)); toCraft.add(ItemHandlerHelper.copyStackWithSize(requested, quantity));
int quantity = this.quantity; int quantity = this.quantity;