diff --git a/CHANGELOG.md b/CHANGELOG.md index 940400b99..1e763ee77 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ NOTE: Worlds that used Refined Storage 1.5.x are fully compatible with Refined S - Fixed a crash when breaking an Ender IO conduit with the Destructor (raoulvdberge) - Fixed bug where storage disks in Portable Grids could be moved into themselves (raoulvdberge) - Fixed the Crafter crashing when opening it while connected to a Primal Tech Grill or Kiln (raoulvdberge) +- Fixed bug where Crafting Upgrade on Interface kept too many items in stock (raoulvdberge) - Prevent accidental Grid scrollbar click after clicking JEI recipe transfer button (raoulvdberge) - Added a missing config option for Crafter Manager energy usage (raoulvdberge) - If an Interface is configured to expose the entire network storage (by configuring no export slots), it will no longer expose the entire RS storage, due to performance issues (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/autocrafting/CraftingManager.java b/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/autocrafting/CraftingManager.java index 42dd4d681..3a36b6867 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/autocrafting/CraftingManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/autocrafting/CraftingManager.java @@ -196,13 +196,15 @@ public class CraftingManager implements ICraftingManager { @Nullable public ICraftingTask schedule(ItemStack stack, int toSchedule) { for (ICraftingTask task : getTasks()) { - for (ItemStack output : task.getPattern().getOutputs()) { - if (API.instance().getComparer().isEqualNoQuantity(output, stack)) { - toSchedule -= output.getCount() * task.getQuantity(); - } + if (API.instance().getComparer().isEqualNoQuantity(task.getRequested(), stack)) { + toSchedule -= task.getQuantity(); } } + ItemStack existing = network.getItemStorageCache().getList().get(stack); + + toSchedule -= existing == null ? 0 : existing.getCount(); + if (toSchedule > 0) { ICraftingTask task = create(stack, toSchedule);