From d1c75574bbc9d00c28ef7a518ce852663948acbc Mon Sep 17 00:00:00 2001 From: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Date: Mon, 13 Jun 2022 04:17:57 +0800 Subject: [PATCH] fix exceed (#14) --- .../vfyjxf/nee/network/packet/PacketNEIPatternRecipe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketNEIPatternRecipe.java b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketNEIPatternRecipe.java index 5dc22e6..6e9900d 100644 --- a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketNEIPatternRecipe.java +++ b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketNEIPatternRecipe.java @@ -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();