Merge pull request #31 from joshiejack/patch-3
Fixing potential arrayoutofbounds exception
This commit is contained in:
commit
82f947b31b
|
@ -91,7 +91,7 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ItemStack> orbs = new ArrayList<ItemStack>();
|
ArrayList<ItemStack> orbs = new ArrayList<ItemStack>();
|
||||||
for(int i = recipe.getOrbLevel(); i <= bloodOrbs.size(); i++) {
|
for(int i = Math.max(0, recipe.getOrbLevel()); i <= bloodOrbs.size(); i++) {
|
||||||
ItemStack orb = new ItemStack(bloodOrbs.get(i - 1));
|
ItemStack orb = new ItemStack(bloodOrbs.get(i - 1));
|
||||||
if(NEIServerUtils.areStacksSameTypeCrafting(orb, ingredient)) {
|
if(NEIServerUtils.areStacksSameTypeCrafting(orb, ingredient)) {
|
||||||
arecipes.add(new CachedAlchemyRecipe(recipe));
|
arecipes.add(new CachedAlchemyRecipe(recipe));
|
||||||
|
|
Loading…
Reference in a new issue