From 10a0453beada2bce9e218837905965a8c3a60d14 Mon Sep 17 00:00:00 2001 From: brachy84 <45517902+brachy84@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:11:44 +0200 Subject: [PATCH] Fix nullable Inscriber inputs (#464) --- .../features/registries/inscriber/InscriberRecipe.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/appeng/core/features/registries/inscriber/InscriberRecipe.java b/src/main/java/appeng/core/features/registries/inscriber/InscriberRecipe.java index 8f8c83658..413698415 100644 --- a/src/main/java/appeng/core/features/registries/inscriber/InscriberRecipe.java +++ b/src/main/java/appeng/core/features/registries/inscriber/InscriberRecipe.java @@ -27,6 +27,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; @@ -58,8 +59,8 @@ public class InscriberRecipe implements IInscriberRecipe { this.inputs.addAll(inputs); this.output = output; - this.maybeTop = top; - this.maybeBot = bot; + this.maybeTop = top == null || top.isEmpty() ? Collections.emptyList() : top; + this.maybeBot = bot == null || bot.isEmpty() ? Collections.emptyList() : bot; this.type = type; } @@ -129,6 +130,4 @@ public class InscriberRecipe implements IInscriberRecipe { result = 31 * result + this.type.hashCode(); return result; } - - }