From a5dc4b4cf55c27b201406b1907abba25259c7e1e Mon Sep 17 00:00:00 2001 From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:54:28 +0800 Subject: [PATCH] Try to fix ICU --- patches/server/0105-Replay-Mod-API.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patches/server/0105-Replay-Mod-API.patch b/patches/server/0105-Replay-Mod-API.patch index 348014a2..21579b0d 100644 --- a/patches/server/0105-Replay-Mod-API.patch +++ b/patches/server/0105-Replay-Mod-API.patch @@ -93,6 +93,19 @@ index d78ad5eccd18d89050a486a0c40090a09683bd16..fc7b20df83cd8cb8cdd7d3c2da2bc48a ((List) object).add(entityplayer2); if (((List) object).size() >= i) { return (List) object; +diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java +index 56bde49e6b7790155b032d0be40961d566ab89e9..de3ba93b136ce05b16341bd3db3135fc2a004fb0 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java +@@ -20,7 +20,7 @@ public record ClientboundSetEntityDataPacket(int id, List> trackedValues, RegistryFriendlyByteBuf buf) { + try (var ignored = io.papermc.paper.util.DataSanitizationUtil.start(true)) { // Paper - data sanitization +- for (SynchedEntityData.DataValue dataValue : trackedValues) { ++ for (SynchedEntityData.DataValue dataValue : new ArrayList<>(trackedValues)) { // Leaves - copy to avoid ConcurrentModificationException + dataValue.write(buf); + } + } // Paper - data sanitization diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 658ac73c319683cf8d74d4af8e2a3fca418bd71c..8bb6f9d26c8a24638ed64e8726b3b11dcccde9c8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java