Skip to content

Commit

Permalink
Handle bad item recipe data
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 12, 2016
1 parent e7de57e commit f5b81db
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -325,7 +325,7 @@ public boolean processSpecialRecipes(final CraftingInventory inventory, final Pl
// Store the current matrix
ItemStack[] matrix1 = inventory.getMatrix();
for (int i = 0; i < matrix1.length; i++) {
matrix1[i] = matrix1[i].clone();
matrix1[i] = matrix1[i] == null ? new ItemStack(Material.AIR) : matrix1[i].clone();
}

// Get the result of the special recipe that this matrix matches,
Expand All @@ -343,7 +343,7 @@ public void run() {
// Store the current matrix
ItemStack[] matrix = inventory.getMatrix();
for (int i = 0; i < matrix.length; i++) {
matrix[i] = matrix[i].clone();
matrix[i] = matrix[i] == null ? new ItemStack(Material.AIR) : matrix[i].clone();
}

// Get the result of the special recipe that this matrix matches,
Expand Down

0 comments on commit f5b81db

Please sign in to comment.