Try/Catch AIOBE - maybe fixes #295 (#312)

* Try/Catch AIOBE - maybe fixes #295

* spotlessApply

Co-authored-by: GitHub GTNH Actions <unknown>
This commit is contained in:
Jason MitchellandGitHub GTNH Actions authored and GitHub committed 2022-10-17 11:34:06 +02:00
1 parent 4b4ab434c0
commit 2cab09e91b
1 file changed
+5 -1
@@ -605,7 +605,11 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
}
public PositionedStack getResultStack(int recipe) {
return arecipes.get(recipe).getResult();
try {
return arecipes.get(recipe).getResult();
} catch (ArrayIndexOutOfBoundsException ignored) {
return null;
}
}
public List<PositionedStack> getOtherStacks(int recipe) {