From ea77bbfbbcf74a82b45651c12bfbdc551bc5251d Mon Sep 17 00:00:00 2001 From: ZhuRuoLing <3489382552@qq.com> Date: Sun, 10 Nov 2024 14:16:45 +0800 Subject: [PATCH] fix PowerToolEvents immutable list bug --- src/main/java/org/teacon/powertool/PowerToolEvents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/teacon/powertool/PowerToolEvents.java b/src/main/java/org/teacon/powertool/PowerToolEvents.java index d6ee350..4d1e377 100644 --- a/src/main/java/org/teacon/powertool/PowerToolEvents.java +++ b/src/main/java/org/teacon/powertool/PowerToolEvents.java @@ -78,7 +78,7 @@ private static void removeDisplayMode( BlockPos pos, @Nullable ServerPlayer player ) { - List displayEnabledPosList = chunk.getData(PowerToolAttachments.DISPLAY_MODE); + List displayEnabledPosList = new ArrayList<>(chunk.getData(PowerToolAttachments.DISPLAY_MODE)); displayEnabledPosList.remove(pos); chunk.setUnsaved(true); chunk.setData(PowerToolAttachments.DISPLAY_MODE, displayEnabledPosList);