some changes, will have a better look at this later

This commit is contained in:
modmuss50 2015-05-08 19:03:09 +01:00
parent 86c3e99666
commit d6ddaa002a

View file

@ -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);
}
}
}