Skip to content

Commit

Permalink
Merge pull request Mithion#1235 from DoomFruit/MagiciansWorkbenchFix
Browse files Browse the repository at this point in the history
Fixes issue Mithion#1029
  • Loading branch information
Mithion committed Sep 12, 2015
2 parents d2a5a9a + dade0ad commit 1b0b0bc
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,13 @@ private void doStandardDecrement(IInventory inventory, ItemStack itemstack1, int
MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, itemstack2));
itemstack2 = null;
}

if (itemstack2 != null && (itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1))){
if (inventory.getStackInSlot(i) == null){
inventory.setInventorySlotContents(i, itemstack2);
}else{
if (itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1)){
if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2))
this.thePlayer.dropItem(itemstack2.getItem(), itemstack2.getItemDamage());
}
}

if (itemstack2 != null){
inventory.setInventorySlotContents(i, itemstack2);
}else{
inventory.decrStackSize(i, 1);
}

}else{
inventory.decrStackSize(i, 1);
}
Expand Down

0 comments on commit 1b0b0bc

Please sign in to comment.