Source:
public void cacheRecipe() { ItemIdentifier oldTargetType = targetType; cache = null; resultInv.clearInventorySlotContents(0); AutoCraftingInventory craftInv = new AutoCraftingInventory(placedBy); for (int i = 0; i < 9; i++) { craftInv.setInventorySlotContents(i, matrix.getStackInSlot(i)); } List<IRecipe> list = new ArrayList<IRecipe>(); for (IRecipe r : CraftingUtil.getRecipeList()) { if (r.matches(craftInv, getWorldObj())) { list.add(r); } } if (list.size() == 1) { cache = list.get(0); resultInv.setInventorySlotContents(0, cache.getCraftingResult(craftInv)); targetType = null; } else if (list.size() > 1) { if (targetType != null) { for (IRecipe recipe : list) { craftInv = new AutoCraftingInventory(placedBy); for (int i = 0; i < 9; i++) { craftInv.setInventorySlotContents(i, matrix.getStackInSlot(i)); } ItemStack result = recipe.getCraftingResult(craftInv); if (result != null && targetType.equals(ItemIdentifier.get(result))) { resultInv.setInventorySlotContents(0, result); cache = recipe; break; } } } if (cache == null) { for (IRecipe r : list) { ItemStack result = r.getCraftingResult(craftInv); if (result != null) { cache = r; resultInv.setInventorySlotContents(0, result); targetType = ItemIdentifier.get(result); } } } } else { targetType = null; } outputFuzzyFlags.stack = resultInv.getIDStackInSlot(0); if (((targetType == null && oldTargetType != null) || (targetType != null && !targetType.equals(oldTargetType))) && !guiWatcher.isEmpty() && getWorldObj() != null && MainProxy.isServer(getWorldObj())) { MainProxy.sendToPlayerList(PacketHandler.getPacket(CraftingSetType.class).setTargetType(targetType).setTilePos(this), guiWatcher); } }

Target:
public void cacheRecipe() { ItemIdentifier oldTargetType = targetType; cache = null; resultInv.clearInventorySlotContents(0); AutoCraftingInventory craftInv = new AutoCraftingInventory(placedBy); for (int i = 0; i < 9; i++) { craftInv.setInventorySlotContents(i, matrix.getStackInSlot(i)); } List<IRecipe> list = new ArrayList<IRecipe>(); for (IRecipe r : CraftingUtil.getRecipeList()) { if (r.matches(craftInv, getWorldObj())) { list.add(r); } } if (list.size() == 1) { cache = list.get(0); resultInv.setInventorySlotContents(0, cache.getCraftingResult(craftInv)); targetType = null; } else if (list.size() > 1) { if (targetType != null) { for (IRecipe recipe : list) { craftInv = new AutoCraftingInventory(placedBy); for (int i = 0; i < 9; i++) { craftInv.setInventorySlotContents(i, matrix.getStackInSlot(i)); } ItemStack result = recipe.getCraftingResult(craftInv); if (result != null && targetType.equals(ItemIdentifier.get(result))) { resultInv.setInventorySlotContents(0, result); cache = recipe; break; } } } if (cache == null) { for (IRecipe r : list) { ItemStack result = r.getCraftingResult(craftInv); if (result != null) { cache = r; resultInv.setInventorySlotContents(0, result); targetType = ItemIdentifier.get(result); break; } } } } else { targetType = null; } outputFuzzyFlags.stack = resultInv.getIDStackInSlot(0); if (((targetType == null && oldTargetType != null) || (targetType != null && !targetType.equals(oldTargetType))) && !guiWatcher.isEmpty() && getWorldObj() != null && MainProxy.isServer(getWorldObj())) { MainProxy.sendToPlayerList(PacketHandler.getPacket(CraftingSetType.class).setTargetType(targetType).setTilePos(this), guiWatcher); } }