From 0fffc829ab740f5191ac391912bdbf379d4c5b6b Mon Sep 17 00:00:00 2001 From: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:14:33 +0800 Subject: [PATCH] Fix invalid pattern outputs throwing NPE in crafting grid (#393) --- src/main/java/appeng/me/cache/CraftingGridCache.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/appeng/me/cache/CraftingGridCache.java b/src/main/java/appeng/me/cache/CraftingGridCache.java index c9e89cc1e00..ee7a696be2e 100644 --- a/src/main/java/appeng/me/cache/CraftingGridCache.java +++ b/src/main/java/appeng/me/cache/CraftingGridCache.java @@ -221,6 +221,9 @@ private void recalculateCraftingPatterns() { // new craftables! for (final ICraftingPatternDetails details : this.craftingMethods.keySet()) { for (IAEItemStack out : details.getOutputs()) { + if (out == null) { + continue; + } out = out.copy(); out.reset(); out.setCraftable(true);