fix loading of crafting tasks
This commit is contained in:
@@ -274,6 +274,9 @@ public class CraftingManager implements ICraftingManager {
|
||||
patterns.addAll((((ICraftingPatternContainer) node).getPatterns()));
|
||||
}
|
||||
}
|
||||
|
||||
// Auto reschedules stuck tasks after a pattern rebuild
|
||||
craftingTasks.forEach(t -> t.getMissing().clear());
|
||||
}
|
||||
|
||||
private static ICraftingTask readCraftingTask(INetworkMaster network, NBTTagCompound tag) {
|
||||
|
||||
@@ -433,7 +433,7 @@ public class CraftingTask implements ICraftingTask {
|
||||
|
||||
@Override
|
||||
public void reschedule() {
|
||||
List<ICraftingStep> mainSteps = this.mainSteps.stream().filter(s -> s.getPattern() == pattern).collect(Collectors.toList());
|
||||
List<ICraftingStep> mainSteps = this.mainSteps.stream().filter(s -> s.getPattern().alike(pattern)).collect(Collectors.toList());
|
||||
missing.clear();
|
||||
this.mainSteps.clear();
|
||||
// if the list of main mainSteps is empty there is no point in rescheduling
|
||||
|
||||
Reference in New Issue
Block a user