Hey there!
I had a similar problem in my mod, where I had multiple outcomes based on item combinations.
You can add NBT to an item stack and then pass it to the GameRegistry, and that NBT will be present when you craft it!
Here I used two metadata items, similar to how the color dyes work.
// iterate through all damage values for meat item
for(int i = 0; i < meatItem.getItemData().size(); i++) {
// create item stack for crafting component
ItemStack meatStack = new ItemStack(meatItem, 1, i);
// iterate through all damage values for cheese item
for(int j = 0; j < cheeseItem.getItemData().size(); j++) {
// create item stack for crafting component
ItemStack cheeseStack = new ItemStack(cheeseItem, 1, j);
// this item stack will be the result with the NBT
ItemStack sandwich = new ItemStack(sandwichItem, 1);
// assign a new tag compound to the item stack
sandwich.setTagCompound(new NBTTagCompound());
// retrieve said compound for modifying
NBTTagCompound tags = sandwich.stackTagCompound;
// here you can set your NBT data on the item
tags.setString("meat", meatStack.getDisplayName());
tags.setByte("meatTier", (byte) ItemMeat.getTier(meatStack));
tags.setString("cheese", cheeseStack.getDisplayName());
// add the recipe to the GameRegistry
GameRegistry.addShapelessRecipe(sandwich, new Object[] { breadSliceItem, breadSliceItem, meatStack, cheeseStack });
}
}
Hope this helps! If I didn't explain anything well enough, please don't hesitate to ask!