Closed Drillgon200 closed 3 years ago
That is very uh, non-canonical behavior to say the least. It doesn't really make any sense for a recipe to have no ingredients.
it seems like you've both misdiagnozed this issue: the problem is that in this line:
ModHandler.addShapelessRecipe("log_to_4_" + recipe.getRecipeOutput().toString(), GTUtility.copyAmount(4, recipe.getRecipeOutput()), recipe.getIngredients().get(0).getMatchingStacks()[0], ToolDictNames.craftingToolSaw);
...the result of getMatchingStack()
is empty, and not that recipe.getIngredients()
is empty. this is simply SoG being uncareful about recipes that might potentially be unsatisfiable
Yeah, you're right phanta, it's the array index access [0]
not the .get(0).get...
that is causing the AIOOBE. This is the first time we've been made aware of a basic log-to-planks crafting table recipe that doesn't match its own recorded ingredients, which is still quite weird.
We'll look into it.
Oh weird, I wonder what recipe it was then. I just kind of assumed it was MKU because that one is generally a weird recipe that has already caused issues with other mods. Hopefully that'll fix it in any case.
Got a crash report from a player recently, tracked it to here. https://github.com/Shadows-of-Fire/Shadows-of-Greg/blob/0b7dffe002abb0f119f0017521d05726b62705cd/src/main/java/gregicadditions/recipes/GARecipeAddition.java#L721
While most of it seems to check the size of ingredients, this line of code doesn't, which crashes with my dynamic recipes that are purposefully designed to not have a persistent set of ingredients. Should be an easy fix.
Here's the crash report from their issue. https://pastebin.com/39vY5NQB