From 165dddda844a969239672cffa01aa1fd080001b3 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 30 Apr 2018 15:21:07 +0200 Subject: [PATCH] Fix Anti-Xray ConcurrentModificationException --- Spigot-Server-Patches/Anti-Xray.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Anti-Xray.patch b/Spigot-Server-Patches/Anti-Xray.patch index 97e5cb4bf..5f5632b9b 100644 --- a/Spigot-Server-Patches/Anti-Xray.patch +++ b/Spigot-Server-Patches/Anti-Xray.patch @@ -1463,7 +1463,7 @@ index d16669bc..306a6b7c 100644 if (flag) { packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 48a008e0..045adbd3 100644 +index 48a008e0..395386f2 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -0,0 +0,0 @@ public class PlayerChunk { @@ -1487,7 +1487,8 @@ index 48a008e0..045adbd3 100644 this.a(this.playerChunkMap.getWorld().getTileEntity(blockposition)); } } else if (this.dirtyCount == 64) { -+ this.chunk.world.chunkPacketBlockController.onChunkPacketCreate(this.chunk, this.h, true); // Paper - Anti-Xray - Load nearby chunks if necessary ++ // Paper - Anti-Xray - Loading chunks here could cause a ConcurrentModificationException #1104 ++ //this.chunk.world.chunkPacketBlockController.onChunkPacketCreate(this.chunk, this.h, true); // Paper - Anti-Xray - Load nearby chunks if necessary this.a((Packet) (new PacketPlayOutMapChunk(this.chunk, this.h))); } else { this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk))); @@ -1517,7 +1518,7 @@ index 8860a012..fa0d66d6 100644 return this.a.size(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 137c2555..75d5451c 100644 +index 00513d02..592e5b3b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;