From c60145d0ce44e1d6633f562e24bd4d825603c701 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Tue, 10 Oct 2023 16:56:01 +0200 Subject: [PATCH 1/2] Fix restarting jobs when resetting network, Closes #99 --- .../core/PendingCraftingJobResultIndexObserver.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cyclops/integratedcrafting/core/PendingCraftingJobResultIndexObserver.java b/src/main/java/org/cyclops/integratedcrafting/core/PendingCraftingJobResultIndexObserver.java index 69a6cee5..03297b31 100644 --- a/src/main/java/org/cyclops/integratedcrafting/core/PendingCraftingJobResultIndexObserver.java +++ b/src/main/java/org/cyclops/integratedcrafting/core/PendingCraftingJobResultIndexObserver.java @@ -42,7 +42,10 @@ public PendingCraftingJobResultIndexObserver(IngredientComponent ingredien @Override public void onChange(IIngredientComponentStorageObservable.StorageChangeEvent event) { - if (event.getChangeType() == IIngredientComponentStorageObservable.Change.ADDITION) { + if (event.getChangeType() == IIngredientComponentStorageObservable.Change.ADDITION + // If we're still initializing the network, skip addition events. + // Otherwise, we could incorrectly mark running crafting jobs as finished. + && !event.isInitialChange()) { IIngredientCollection addedIngredients = event.getInstances(); IIngredientComponentStorage ingredientsHayStack = null; // A mutable copy of addedIngredients (lazily created) IIngredientMatcher matcher = ingredientComponent.getMatcher(); From e581c851521660d619dbc623b8ebe38d579d2f7f Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Tue, 10 Oct 2023 16:56:21 +0200 Subject: [PATCH 2/2] Bump mod version --- gradle.properties | 4 ++-- resources/changelog/1.18.2-1.1.5.txt | 6 ++++++ src/main/resources/META-INF/mods.toml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 resources/changelog/1.18.2-1.1.5.txt diff --git a/gradle.properties b/gradle.properties index b7c3f171..a5f0a1e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ -mod_version=1.1.4 +mod_version=1.1.5 minecraft_version=1.18.2 forge_version=40.0.54 cyclopscore_version=1.13.4-158 -integrateddynamics_version=1.18.2-1.16.0-642 +integrateddynamics_version=1.18.2-1.17.0-657 release_type=release fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44 diff --git a/resources/changelog/1.18.2-1.1.5.txt b/resources/changelog/1.18.2-1.1.5.txt new file mode 100644 index 00000000..0d53bfdf --- /dev/null +++ b/resources/changelog/1.18.2-1.1.5.txt @@ -0,0 +1,6 @@ +As always, don't forget to backup your world before updating! +Requires CyclopsCore version 1.13.4 or higher. + +Fixes: +* Fix restarting jobs when resetting network, Closes #99 + diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 8616e76c..f8a11df4 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -22,7 +22,7 @@ Craft stuff in Integrated Dynamics networks. [[dependencies.integratedcrafting]] modId="integrateddynamics" mandatory=true - versionRange="[1.16.0,)" + versionRange="[1.17.0,)" ordering="NONE" side="BOTH" [[dependencies.integratedcrafting]]