Skip to content

Commit f15673c

Browse files
committed
Merge remote-tracking branch 'origin/master-1.21-lts' into master-1.21
2 parents b8a82b5 + 179d96a commit f15673c

13 files changed

Lines changed: 169 additions & 170 deletions

File tree

CHANGELOG-1.21.1.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Changelog for Minecraft 1.21.1
22
All notable changes to this project will be documented in this file.
33

4+
<a name="1.21.1-1.4.1"></a>
5+
## [1.21.1-1.4.1](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.4.0...1.21.1-1.4.1) - 2026-01-02 10:56:30
6+
7+
8+
### Added
9+
* Add translations through Crowdin (#165)
10+
11+
### Fixed
12+
* Fix crafting storage not dropping when breaking crafting interfaces
13+
* Fix crafting job completion when using importers, Closes #170
14+
415
<a name="1.21.1-1.4.0"></a>
5-
## [1.21.1-1.4.0](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.3.4...1.21.1-1.4.0) - 2025-12-31 14:44:30
16+
## [1.21.1-1.4.0](https://github.com/CyclopsMC/IntegratedCrafting/compare/1.21.1-1.3.4...1.21.1-1.4.0) - 2025-12-31 14:44:30 +0100
617

718

819
### Changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ org.gradle.caching=true
3232

3333
# Dependencies
3434
cyclopscore_version=1.25.5-871
35-
integrateddynamics_version=1.24.1-1455
35+
integrateddynamics_version=1.24.1-1463
3636
commoncapabilities_version=2.9.7-303
3737
integratedtunnels_version=1.8.30-534
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
As always, don't forget to backup your world before updating!
2+
Requires CyclopsCore version 1.26.2 or higher.
3+
4+
Additions:
5+
* Add translations through Crowdin (#165)
6+
7+
Fixes:
8+
* Fix crafting storage not dropping when breaking crafting interfaces
9+
* Fix crafting job completion when using importers, Closes #170

src/main/java/org/cyclops/integratedcrafting/core/CraftingJobHandler.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.cyclops.integratedcrafting.IntegratedCrafting;
2525
import org.cyclops.integratedcrafting.api.crafting.*;
2626
import org.cyclops.integratedcrafting.api.network.ICraftingNetwork;
27-
import org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable;
2827
import org.cyclops.integrateddynamics.api.network.INetwork;
2928
import org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients;
3029
import org.cyclops.integrateddynamics.api.part.PartPos;
@@ -306,9 +305,8 @@ protected <T, M> void registerIngredientObserver(IngredientComponent<T, M> ingre
306305
IPositionedAddonsNetworkIngredients<T, M> ingredientsNetwork = CraftingHelpers
307306
.getIngredientsNetworkChecked(network, ingredientComponent);
308307
ICraftingNetwork craftingNetwork = CraftingHelpers.getCraftingNetworkChecked(network);
309-
PendingCraftingJobResultIndexObserver<T, M> observer = new PendingCraftingJobResultIndexObserver<>(ingredientComponent, this, craftingNetwork, ingredientsNetwork, network);
310-
ingredientsNetwork.addObserver(observer);
311-
ingredientsNetwork.scheduleObservation();
308+
PendingCraftingJobResultIndexObserver<T, M> observer = new PendingCraftingJobResultIndexObserver<>(ingredientComponent, this, craftingNetwork);
309+
ingredientsNetwork.registerInsertPreConsumer(observer);
312310
ingredientObservers.put(ingredientComponent, observer);
313311
}
314312
ingredientObserverCounters.put(ingredientComponent, count + 1);
@@ -321,10 +319,10 @@ protected <T, M> void unregisterIngredientObserver(IngredientComponent<T, M> ing
321319
if (count == 0) {
322320
IPositionedAddonsNetworkIngredients<T, M> ingredientsNetwork = CraftingHelpers
323321
.getIngredientsNetworkChecked(network, ingredientComponent);
324-
IIngredientComponentStorageObservable.IIndexChangeObserver<T, M> observer =
325-
(IIngredientComponentStorageObservable.IIndexChangeObserver<T, M>) ingredientObservers
322+
PendingCraftingJobResultIndexObserver<T, M> observer =
323+
(PendingCraftingJobResultIndexObserver<T, M>) ingredientObservers
326324
.remove(ingredientComponent);
327-
ingredientsNetwork.removeObserver(observer);
325+
ingredientsNetwork.unregisterInsertPreConsumer(observer);
328326
}
329327
}
330328

@@ -347,14 +345,6 @@ public void markCraftingJobFinished(int craftingJobId) {
347345
craftingJob.setAmount(0);
348346
}
349347

350-
public void reRegisterObservers(INetwork network) {
351-
for (Map.Entry<IngredientComponent<?, ?>, PendingCraftingJobResultIndexObserver<?, ?>> entry : ingredientObservers.entrySet()) {
352-
IPositionedAddonsNetworkIngredients ingredientsNetwork = CraftingHelpers
353-
.getIngredientsNetworkChecked(network, entry.getKey());
354-
ingredientsNetwork.addObserver(entry.getValue());
355-
}
356-
}
357-
358348
public void onCraftingJobEntryFinished(ICraftingNetwork craftingNetwork, int craftingJobId) {
359349
CraftingJob craftingJob = this.allCraftingJobs.get(craftingJobId);
360350
craftingJob.setAmount(craftingJob.getAmount() - 1);
@@ -660,7 +650,7 @@ public <T, M> IngredientInstanceWrapper<T, M> beforeFlushIngredientToNetwork(Ing
660650
if (observer != null) {
661651
IIngredientCollectionMutable<T, M> instances = new IngredientCollectionPrototypeMap<>(instanceWrapper.getComponent());
662652
instances.add(instanceWrapper.getInstance());
663-
return observer.addIngredient(instanceWrapper, channel);
653+
return observer.addIngredient(instanceWrapper, channel, false);
664654
}
665655
return instanceWrapper;
666656
}

0 commit comments

Comments
 (0)