From 7278f80c6fad46058cb976966f022603a9773f3e Mon Sep 17 00:00:00 2001 From: Oliver Wright Date: Fri, 2 Mar 2018 20:17:44 +0000 Subject: [PATCH] Fix #617: Electric Dust Washer - Dust Choice. --- .../SlimefunItem/machines/ElectricDustWasher.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/machines/ElectricDustWasher.java b/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/machines/ElectricDustWasher.java index fdc573884..23ca3c005 100644 --- a/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/machines/ElectricDustWasher.java +++ b/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/machines/ElectricDustWasher.java @@ -82,7 +82,14 @@ public abstract class ElectricDustWasher extends AContainer { else { for (int slot: getInputSlots()) { if (SlimefunManager.isItemSimiliar(BlockStorage.getInventory(b).getItemInSlot(slot), SlimefunItems.SIFTED_ORE, true)) { - + boolean empty_slot = false; + for (int output_slot: getOutputSlots()) { + if (BlockStorage.getInventory(b).getItemInSlot(output_slot) == null) { + empty_slot = true; + break; + } + } + if (!empty_slot) return; ItemStack adding = SlimefunItems.IRON_DUST; if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.GOLD_DUST; else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.ALUMINUM_DUST; @@ -94,7 +101,6 @@ public abstract class ElectricDustWasher extends AContainer { else if (SlimefunStartup.chance(100, 25)) adding = SlimefunItems.SILVER_DUST; MachineRecipe r = new MachineRecipe(4 / getSpeed(), new ItemStack[0], new ItemStack[] {adding}); - if (!fits(b, r.getOutput())) return; BlockStorage.getInventory(b).replaceExistingItem(slot, InvUtils.decreaseItem(BlockStorage.getInventory(b).getItemInSlot(slot), 1)); processing.put(b, r); progress.put(b, r.getTicks());