Skip to content

Commit

Permalink
refactor: ♻️ Make sure to set immutable Sets when updating component …
Browse files Browse the repository at this point in the history
…values
  • Loading branch information
P3pp3rF1y committed Nov 6, 2024
1 parent 6883da9 commit 9d42dbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ public void setPushingTo(Direction direction, boolean isPushing) {
}

private void serializePullDirections() {
upgrade.set(ModDataComponents.PULL_DIRECTIONS, pullDirections);
upgrade.set(ModDataComponents.PULL_DIRECTIONS, Set.copyOf(pullDirections));
save();
}

private void serializePushDirections() {
upgrade.set(ModDataComponents.PUSH_DIRECTIONS, pushDirections);
upgrade.set(ModDataComponents.PUSH_DIRECTIONS, Set.copyOf(pushDirections));
save();
}

Expand Down

0 comments on commit 9d42dbb

Please sign in to comment.