Skip to content

Commit

Permalink
Try to fix ICU
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumine1909 committed Jun 28, 2024
1 parent d2af353 commit a5dc4b4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/server/0105-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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<SynchedEntityData.Data

private static void pack(List<SynchedEntityData.DataValue<?>> 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
Expand Down

0 comments on commit a5dc4b4

Please sign in to comment.