From 97f11922bd2552a23cdda093055a98facf96ca80 Mon Sep 17 00:00:00 2001 From: 90 Date: Sat, 11 May 2024 23:33:26 +0100 Subject: [PATCH] Fix being unable to encode processing patterns (#7866) Closes #7855. --- .../appeng/crafting/pattern/EncodedProcessingPattern.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/crafting/pattern/EncodedProcessingPattern.java b/src/main/java/appeng/crafting/pattern/EncodedProcessingPattern.java index 2657780d50b..6489eafa6f8 100644 --- a/src/main/java/appeng/crafting/pattern/EncodedProcessingPattern.java +++ b/src/main/java/appeng/crafting/pattern/EncodedProcessingPattern.java @@ -1,5 +1,6 @@ package appeng.crafting.pattern; +import java.util.Collections; import java.util.List; import java.util.stream.Stream; @@ -17,8 +18,8 @@ public record EncodedProcessingPattern( List sparseInputs, List sparseOutputs) { public EncodedProcessingPattern { - sparseInputs = List.copyOf(sparseInputs); - sparseOutputs = List.copyOf(sparseOutputs); + sparseInputs = Collections.unmodifiableList(sparseInputs); + sparseOutputs = Collections.unmodifiableList(sparseOutputs); } public static final Codec CODEC = RecordCodecBuilder.create(builder -> builder.group(