Look at the way it is done in vanilla (you will mostly be looking at the ContainerWorkbench). The craftMatrix field, slot initialization and the onCraftMatrixChanged are the things that you will need to build your own functional "crafting container".
The most difficult part of it I guess is the CraftingManager as you have mentioned, but you could create a new recipe class that will implement IRecipe, have a Shaped/ShapelessOreRecipe stored in there for the 3x3 matrix and a string representing the oredict id of your pan/whatever you want the recipe to work with. Then you would add your recipes to some kind of array/list so in your container you could iterate through them to find the matching one. You do not need the full functionality of the CraftingManager class But it still would be a good idea to implement those which are related to crafting. Sounds confusing enough?
Here is a very simple example:
public class YourRecipe implements IRecipe
{
public final IRecipe craftMatrixRecipe;
public final String penItem;
...
public YourRecipe(...){...}
public boolean matches(InventoryCrafting inv, ItemStack fryingPenItemStack, World w)
{
return yourCheckThatFryingPenItemStackParamIsThePenItemYouWant && this.craftMatrixRecipe.matches(inv, w);
}
...All other implemented methods. You can see how they are handled in vanilla & forge recipes. There is nothing special to them
}
public class SimpleCraftingManager
{
public static List<YourRecipe> allMyRecipes = Lists.newArrayList();
public static void register(YourRecipe rec)
{
allMyRecipes.add(rec);
}
public static ItemStack findMatchingRecipe(InventoryCrafting craftMatrix, ItemStack penItem, World worldIn)
{
for (YourRecipe rec : allMyRecipes)
{
if (rec.matches(craftMatrix, penItem, worldIn))
{
return rec;
}
}
return ItemStack.EMPTY;
}
...All other implemented methods you need
}
Or you could even make your instance of InventoryMatrix have a not 3x3 height/width and have 1 less method as you will be able to use the regular IRecipe::matches
In your container then you would simply reference your CraftingManager instead of vanilla's.
Note that if you want NEI/JEI/Whatever integration you will need your own handlers for that.