fix exceed (#14)

This commit is contained in:
Yang Xizhi authored and GitHub committed 2022-06-12 22:17:57 +02:00
1 parent bc56551056
commit d1c75574bb
1 file changed
+1 -1
@@ -194,7 +194,7 @@ public class PacketNEIPatternRecipe implements IMessage{
final IInventory outputMatrix = cct.getInventoryByName("output");
if (inv != null && message.input != null && security != null) {
for (int i = 0; i < craftMatrix.getSizeInventory(); i++) {
for (int i = 0; i < Math.min(craftMatrix.getSizeInventory(), recipeInput.length); i++) {
ItemStack currentItem = null;
if (recipeInput[i] != null) {
currentItem = recipeInput[i].copy();