Buggy code:
public class ContainerRecipeBook extends Container { private final EntityPlayer player ; private final boolean allowCrafting ; private final boolean allowSmelting ; private final boolean isClientSide ; private final InventoryRecipeBook recipeBook ; private final SlotRecipe [ ] recipeBookSlots = new SlotRecipe [ 12 ] ; private final InventoryRecipeBookMatrix craftMatrix ; private final SlotCraftMatrix [ ] craftMatrixSlots = new SlotCraftMatrix [ 9 ] ; private final ArrayListMultimap < String , FoodRecipe > availableRecipes = ArrayListMultimap . create ( ) ; private final List < ItemStack > sortedRecipes = new ArrayList < ItemStack > ( ) ; private final InventoryCraftBook craftBook ; private Comparator < ItemStack > currentSort = new ComparatorName ( ) ; private int scrollOffset ; private boolean isFurnaceRecipe ; private boolean isSelectionDirty ; private boolean isRecipeListDirty ; private int syncSlotIndex = - 1 ; private int currentSlotIndex = - 1 ; private FoodRecipe currentRecipe ; private boolean hasVariants ; private boolean isMissingTools ; private boolean isMissingOven ; private String currentRecipeKey ; private List < FoodRecipe > currentRecipeList ; private int currentRecipeIdx ; private IInventory [ ] sourceInventories ; private boolean noFilter ; private World tileWorld ; private int tileX ; private int tileY ; private int tileZ ; public ContainerRecipeBook ( EntityPlayer player , boolean allowCrafting , boolean allowSmelting , boolean isClientSide ) { } public void setCraftMatrix ( FoodRecipe recipe ) { } public boolean hasVariants ( ) { } public void setScrollOffset ( int scrollOffset ) { } public void updateRecipeList ( ) { } @ Override public boolean canInteractWith ( EntityPlayer player ) { } @ Override @ SideOnly ( Side . CLIENT ) public ItemStack slotClick ( int slotIdx , int button , int mode , EntityPlayer player ) { } public void clickRecipe ( int slotIdx , boolean shiftClick ) { } private void trySmelt ( EntityPlayer player , FoodRecipe recipe , boolean isShiftDown ) { if ( ! ( recipe . isSmeltingRecipe ( ) ) ) { return ; } for ( int i = 0 ; i < ( sourceInventories . length ) ; i ++ ) { for ( int j = 0 ; j < ( sourceInventories [ i ] . getSizeInventory ( ) ) ; j ++ ) { ItemStack itemStack = sourceInventories [ i ] . getStackInSlot ( j ) ; if ( itemStack != null ) { for ( ItemStack ingredientStack : recipe . getCraftMatrix ( ) [ 0 ] . getItemStacks ( ) ) { if ( itemStack . getHasSubtypes ( ) ? itemStack . isItemEqual ( ingredientStack ) : ( itemStack . getItem ( ) ) == ( ingredientStack . getItem ( ) ) ) { int count = ( isShiftDown ) ? Math . min ( itemStack . stackSize , ingredientStack . getMaxStackSize ( ) ) : 1 ; TileEntityCookingOven tileEntity = findCookingOven ( ) ; int [ ] ovenInputSlots = tileEntity . getSlotsForFace ( UP . ordinal ( ) ) ; int ovenFirstSlot = - 1 ; for ( int ovenSlot : ovenInputSlots ) { ItemStack ovenStack = tileEntity . getStackInSlot ( ovenSlot ) ; if ( ( ovenStack != null ) && ( ovenStack . getHasSubtypes ( ) ? itemStack . isItemEqual ( ovenStack ) : ( itemStack . getItem ( ) ) == ( ovenStack . getItem ( ) ) ) ) { ovenFirstSlot = ovenSlot ; break ; } } if ( ovenFirstSlot == ( - 1 ) ) { for ( int ovenSlot : ovenInputSlots ) { if ( ( tileEntity . getStackInSlot ( ovenSlot ) ) == null ) { ovenFirstSlot = ovenSlot ; break ; } } } <START_BUG> if ( ovenFirstSlot != ( - 1 ) ) { <END_BUG> tileEntity . setInventorySlotContents ( ovenFirstSlot , itemStack . splitStack ( count ) ) ; tileEntity . markDirty ( ) ; if ( ( itemStack . stackSize ) == 0 ) { sourceInventories [ i ] . setInventorySlotContents ( j , null ) ; } return ; } break ; } } } } } } private void tryCraft ( EntityPlayer player , FoodRecipe recipe , boolean isShiftDown ) { } @ Override public ItemStack transferStackInSlot ( EntityPlayer player , int i ) { } public int getAvailableRecipeCount ( ) { } public boolean isFurnaceRecipe ( ) { } public boolean hasSelection ( ) { } public boolean canClickSmelt ( int slotIndex ) { } public boolean canClickCraft ( int slotIndex ) { } public boolean isMissingTools ( ) { } public boolean isRecipeListDirty ( ) { } public void markDirty ( boolean dirty ) { } @ SideOnly ( Side . CLIENT ) public void setAvailableItems ( List < ItemStack > sortedRecipes , ArrayListMultimap < String , FoodRecipe > availableRecipes ) { } public boolean gotRecipeInfo ( ) { } public ContainerRecipeBook setSourceInventories ( IInventory ... sourceInventories ) { } public void findAvailableRecipes ( ) { } public void sortRecipes ( Comparator < ItemStack > comparator ) { } public void prevRecipe ( ) { } public void nextRecipe ( ) { } @ Override public void detectAndSendChanges ( ) { } public ContainerRecipeBook setNoFilter ( ) { } public ContainerRecipeBook setTilePosition ( World world , int x , int y , int z ) { } public TileEntityCookingOven findCookingOven ( ) { } @ SideOnly ( Side . CLIENT ) public void setSelectedRecipe ( int currentSlotIndex , FoodRecipe currentRecipe , boolean hasVariants , boolean isMissingTools , boolean isMissingOven ) { } public boolean isMissingOven ( ) { } }

Fix:
if ( ( ovenFirstSlot != ( - 1 ) ) && ( ( tileEntity != ( sourceInventories [ i ] ) ) || ( ( j >= 4 ) && ( j <= 6 ) ) ) ) {