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:
@@ -187,7 +187,7 @@ public class StackListItem implements IStackList<ItemStack> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack[] toCraftingGrid(IStackList<ItemStack> list, List<ItemStack> grid, int compare) {
|
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++) {
|
for (int i = 0; i < grid.size(); i++) {
|
||||||
ItemStack input = grid.get(i);
|
ItemStack input = grid.get(i);
|
||||||
if (input != null) {
|
if (input != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user