fix loading of crafting tasks
This commit is contained in:
@@ -274,6 +274,9 @@ public class CraftingManager implements ICraftingManager {
|
|||||||
patterns.addAll((((ICraftingPatternContainer) node).getPatterns()));
|
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) {
|
private static ICraftingTask readCraftingTask(INetworkMaster network, NBTTagCompound tag) {
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reschedule() {
|
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();
|
missing.clear();
|
||||||
this.mainSteps.clear();
|
this.mainSteps.clear();
|
||||||
// if the list of main mainSteps is empty there is no point in rescheduling
|
// if the list of main mainSteps is empty there is no point in rescheduling
|
||||||
|
|||||||
Reference in New Issue
Block a user