private void smeltItem() { ItemStack toSmelt = inventory[1]; ItemStack smeltResult = FurnaceRecipes.smelting().getSmeltingResult(toSmelt).copy(); ItemStack currentSmelted = getStackInSlot(outputSlot); if (Utils.getOreDictionaryName(toSmelt).startsWith("ore")) { smeltResult.stackSize *= 2; } if (currentSmelted == null) { setInventorySlotContents(outputSlot, smeltResult); } else { currentSmelted.stackSize += smeltResult.stackSize; } decrStackSize(1, 1); }