From d6ddaa002a5adf023e6e1e5965ce32251b5f7044 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Fri, 8 May 2015 19:03:09 +0100 Subject: [PATCH] some changes, will have a better look at this later --- src/main/java/techreborn/api/recipe/RecipeCrafter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/api/recipe/RecipeCrafter.java b/src/main/java/techreborn/api/recipe/RecipeCrafter.java index c58dd3273..d5dc0af1d 100644 --- a/src/main/java/techreborn/api/recipe/RecipeCrafter.java +++ b/src/main/java/techreborn/api/recipe/RecipeCrafter.java @@ -164,10 +164,13 @@ public class RecipeCrafter { } if (inventory.getStackInSlot(slot) == null) { inventory.setInventorySlotContents(slot, stack); + return; } if (ItemUtils.isItemEqual(inventory.getStackInSlot(slot), stack, true, true)) { if (stack.stackSize + inventory.getStackInSlot(slot).stackSize <= stack.getMaxStackSize()) { - inventory.decrStackSize(slot, -stack.stackSize); + ItemStack newStack = stack.copy(); + newStack.stackSize = inventory.getStackInSlot(slot).stackSize + stack.stackSize; + inventory.setInventorySlotContents(slot, newStack); } } }