mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Fix division by zero when Ingredient has no stacks. Closes #2444
This commit is contained in:
1 parent
9cedab815f
commit
a299257431
1 file changed
+2
-2
@@ -150,8 +150,8 @@ public class PageCraftingRecipe extends PageRecipe {
|
||||
for(int y = 0; y < height; y++)
|
||||
for(int x = 0; x < width; x++) {
|
||||
Ingredient input = recipe.getIngredients().get(y * width + x);
|
||||
if(input != Ingredient.EMPTY) {
|
||||
ItemStack[] stacks = input.getMatchingStacks();
|
||||
ItemStack[] stacks = input.getMatchingStacks();
|
||||
if(stacks.length > 0) {
|
||||
renderItemAtGridPos(gui, 1 + x, 1 + y, stacks[(ticksElapsed / 40) % stacks.length], true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user