Try this
LoadInteger(itemId,itemId2) -> returns recipe id
if recipe id isn't 0
LoadInteger(recipeId,itemId3) etc...
and recipe id could be a struct that shows min/max recipe size for those 2 items. For example, if max recipe size is 3, then you could check for other items. If min was 2 and max was 2, then you could stop where you are.
Each recipe struct would also have the item that is generated by the recipe.
Another way you could do it would ofc be a Tree.
I don't necessarily recommend using QueueQueue. Just making a general tree inside of the resource would work fine =). QueueQueue has too many features you won't need, like its pointers.