Fix calculating crafting resources for more than 9 unique items (#1289)

* Fix calculating crafting resources for more than 9 unique items

* Add Math.max
This commit is contained in:
ExpensiveKoala
2017-06-08 11:05:38 -04:00
committed by Raoul
parent 13d66821c6
commit 9fa2fcc772

View File

@@ -187,7 +187,7 @@ public class StackListItem implements IStackList<ItemStack> {
}
public static ItemStack[] toCraftingGrid(IStackList<ItemStack> list, List<ItemStack> grid, int compare) {
ItemStack[] took = new ItemStack[9];
ItemStack[] took = new ItemStack[Math.max(9, grid.size())];
for (int i = 0; i < grid.size(); i++) {
ItemStack input = grid.get(i);
if (input != null) {