Fixed inventory slots being reused incorrectly in rare cases in the JEI transfer handler. Fixes #3431
This commit is contained in:
@@ -11,6 +11,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
- Fixed external storage cache being de-synced from the network cache.
|
- Fixed external storage cache being de-synced from the network cache.
|
||||||
- Fixed external storage using an out of date block entity for getting handler.
|
- Fixed external storage using an out of date block entity for getting handler.
|
||||||
|
- Fixed inventory slots being reused incorrectly in rare cases in the JEI transfer handler.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@@ -205,7 +205,7 @@ public class IngredientTracker {
|
|||||||
int amount = Math.min(ingredient.getMissingAmount(), used == null ? stackInSlot.getCount() : stackInSlot.getCount() - used);
|
int amount = Math.min(ingredient.getMissingAmount(), used == null ? stackInSlot.getCount() : stackInSlot.getCount() - used);
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
ingredient.fulfill(amount);
|
ingredient.fulfill(amount);
|
||||||
usedMatrixStacks.put(slot, amount);
|
usedMatrixStacks.put(slot, used == null ? amount : used + amount);
|
||||||
}
|
}
|
||||||
return ingredient.isAvailable();
|
return ingredient.isAvailable();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user