Byproducts is always nonnull and nonempty
This commit is contained in:
@@ -100,10 +100,8 @@ public class CraftingStepCraft extends CraftingStep {
|
||||
}
|
||||
|
||||
for (ItemStack byproduct : (pattern.isOredict() ? pattern.getByproducts(took) : pattern.getByproducts())) {
|
||||
if (byproduct != null && !byproduct.isEmpty()) {
|
||||
toInsertItems.add(byproduct.copy());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Couldn't extract items
|
||||
startedProcessing = false;
|
||||
|
||||
@@ -129,7 +129,7 @@ public class CraftingTask implements ICraftingTask {
|
||||
List<ICraftingStep> previousSteps = new LinkedList<>();
|
||||
|
||||
IStackList<ItemStack> byproductList = API.instance().createItemStackList();
|
||||
pattern.getByproducts().stream().filter(s -> !s.isEmpty()).forEach(byproductList::add);
|
||||
pattern.getByproducts().forEach(byproductList::add);
|
||||
|
||||
for (List<ItemStack> inputs : pattern.getOreInputs()) {
|
||||
if (inputs == null || inputs.isEmpty()) {
|
||||
@@ -303,10 +303,8 @@ public class CraftingTask implements ICraftingTask {
|
||||
}
|
||||
|
||||
for (ItemStack byproduct : (!pattern.isProcessing() && pattern.isOredict() && missing.isEmpty()) ? pattern.getByproducts(took) : pattern.getByproducts()) {
|
||||
if (byproduct != null && !byproduct.isEmpty()) {
|
||||
toInsert.add(byproduct);
|
||||
}
|
||||
}
|
||||
|
||||
usedPatterns.remove(pattern);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user