jakimfett/Minechem — pull request #165 by hilburn (2014-09-29 13:07:12+00:00)
Title: Decomposer Recipe Improvements

Changes at a glance:
1. Decomposer Recipes stored in Hashtable rather than ArrayList - format is where the String is a key generated from the Item/FluidStack of the DecomposerRecipe.input
- Why? - Allows for much faster searching of the recipes (recipes.get(getKey(ItemStack) rather than iterating through ArrayList checking for equal ItemStack)
2. The recursive DecomposerRecipe generation function is now called for all recipes in postInit
- Why? - By adding them to the DecomposerRecipes.recipes Hashtable you massively reduce load on the server when actually running the Decomposer with non-basic items (solving jakimfett/Minechem#163)
3. Recursive Recipe Generation runs faster now using hashtables
- Why? - All recipes are mapped to hashtables before recursion starts - this leads to quicker assessment of crafting components in the recursive function
4. Recursive depth increased to 20 - 2/3 give enough of a performance boost to the function that it is not even noticeable
5. OreDictionay returning ItemStacks of wood with ItemDamage of INTEGER_MAX - hacky fix which checks for large damage values and set to 0 fixes this but should be addressed in future