Skip to content

Commit

Permalink
Fix being unable to encode processing patterns (#7866)
Browse files Browse the repository at this point in the history
Closes #7855.
  • Loading branch information
62832 authored May 11, 2024
1 parent 05b0df9 commit 97f1192
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package appeng.crafting.pattern;

import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;

Expand All @@ -17,8 +18,8 @@ public record EncodedProcessingPattern(
List<GenericStack> sparseInputs,
List<GenericStack> sparseOutputs) {
public EncodedProcessingPattern {
sparseInputs = List.copyOf(sparseInputs);
sparseOutputs = List.copyOf(sparseOutputs);
sparseInputs = Collections.unmodifiableList(sparseInputs);
sparseOutputs = Collections.unmodifiableList(sparseOutputs);
}

public static final Codec<EncodedProcessingPattern> CODEC = RecordCodecBuilder.create(builder -> builder.group(
Expand Down

0 comments on commit 97f1192

Please sign in to comment.