In my attempt to make a mod for configuring the CraftingManager's recipe list from the convenience of a configuration file, I've repeatedly worked around less than ideal circumstances. However, I find myself stuck on an especially cantankerous problem.
Parsing data from the Configuration file to fill a recipe list is trivial compared to putting information there representing the initial state. Attempts at crawling through the recipe list, with the intent to build a string encoding the recipe instance's field values in a way that allows me to construct them, is hacky, but worse I have been unable to make it work.
If one could magically get the argument values for the constructors, that would be perfect. In lieu of that ideal scenario, I figured getting the field values from instances would make a fine alternative, given that most of the IRecipe-implementing classes plop their constructor arguments into their field members. Ugly, but doable; even the OreRecipes comply. Fields can't be relied upon to be public, constructors aren't magic, so I'm left with reflection.
And here, I plant my face into a wall. Making a class field crawler both generic and useful has worn on my patience. I seek suggestions on how I might solve the problem; perhaps I've overlooked a more elegant solution, or maybe someone can elucidate on how I might crawl the class fields. If not, I'll be forced to resort to a less savory approach like not dumping the initial recipe list to the configuration file.