From 6cd2b2774347208a91d3ef8b7df5122a2f98d5b6 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 21 May 2014 12:01:10 +0100 Subject: [PATCH] Fix a ConcurrentModificationException in the antixray --- CraftBukkit-Patches/0063-Orebfuscator.patch | 31 +++++++++++++++---- .../0074-More-Efficient-GetCubes.patch | 6 ++-- .../0107-Guard-Entity-List.patch | 8 ++--- ...dificationException-while-being-idle.patch | 6 ++-- ...-getting-ticked-after-being-queued-f.patch | 8 ++--- ...ssDefError-crash-and-notify-on-crash.patch | 6 ++-- 6 files changed, 42 insertions(+), 23 deletions(-) diff --git a/CraftBukkit-Patches/0063-Orebfuscator.patch b/CraftBukkit-Patches/0063-Orebfuscator.patch index 95fa15b148..10e67e6be5 100644 --- a/CraftBukkit-Patches/0063-Orebfuscator.patch +++ b/CraftBukkit-Patches/0063-Orebfuscator.patch @@ -1,4 +1,4 @@ -From ef9e06887f0d3836c29e13ae7927b23b9ad36bf1 Mon Sep 17 00:00:00 2001 +From 37f3e3718d4d554cf96839442b7f07be32cb80d0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator @@ -115,10 +115,29 @@ index 2db45ad..97fe53c 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6da7de6..2de7e62 100644 +index 6da7de6..84fe64c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -548,6 +548,7 @@ public abstract class World implements IBlockAccess { +@@ -233,9 +233,16 @@ public abstract class World implements IBlockAccess { + return this.getType(i, k, j); + } + +- public Block getType(int i, int j, int k) { ++ // Spigot start ++ public Block getType(int i, int j, int k) ++ { ++ return getType( i, j, k, true ); ++ } ++ ++ public Block getType(int i, int j, int k, boolean useCaptured) { + // CraftBukkit start - tree generation +- if (captureTreeGeneration) { ++ if (captureTreeGeneration && useCaptured) { ++ // Spigot end + Iterator it = capturedBlockStates.iterator(); + while (it.hasNext()) { + BlockState previous = it.next(); +@@ -548,6 +555,7 @@ public abstract class World implements IBlockAccess { this.e(i, j + 1, k, block); this.e(i, j, k - 1, block); this.e(i, j, k + 1, block); @@ -128,7 +147,7 @@ index 6da7de6..2de7e62 100644 public void b(int i, int j, int k, Block block, int l) { diff --git a/src/main/java/org/spigotmc/AntiXray.java b/src/main/java/org/spigotmc/AntiXray.java new file mode 100644 -index 0000000..20ae98e +index 0000000..d326d18 --- /dev/null +++ b/src/main/java/org/spigotmc/AntiXray.java @@ -0,0 +1,227 @@ @@ -340,7 +359,7 @@ index 0000000..20ae98e + + private static boolean hasTransparentBlockAdjacent(World world, int x, int y, int z, int radius) + { -+ return !isSolidBlock(world.getType(x, y, z)) /* isSolidBlock */ ++ return !isSolidBlock(world.getType(x, y, z, false)) /* isSolidBlock */ + || ( radius > 0 + && ( hasTransparentBlockAdjacent( world, x + 1, y, z, radius - 1 ) + || hasTransparentBlockAdjacent( world, x - 1, y, z, radius - 1 ) @@ -408,5 +427,5 @@ index 1814b4f..45b2aae 100644 + } } -- -1.8.3.2 +1.9.1 diff --git a/CraftBukkit-Patches/0074-More-Efficient-GetCubes.patch b/CraftBukkit-Patches/0074-More-Efficient-GetCubes.patch index 7c735ade2e..b24b684744 100644 --- a/CraftBukkit-Patches/0074-More-Efficient-GetCubes.patch +++ b/CraftBukkit-Patches/0074-More-Efficient-GetCubes.patch @@ -1,14 +1,14 @@ -From fa881e4c93207dd4134cb33d0c35d30837ec0f30 Mon Sep 17 00:00:00 2001 +From 2f1bc09349a0486fae4d22457b9251248222d915 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:17:37 +1000 Subject: [PATCH] More Efficient GetCubes diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2de7e62..eb6772a 100644 +index 84fe64c..e557b4f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1128,23 +1128,42 @@ public abstract class World implements IBlockAccess { +@@ -1135,23 +1135,42 @@ public abstract class World implements IBlockAccess { int i1 = MathHelper.floor(axisalignedbb.c); int j1 = MathHelper.floor(axisalignedbb.f + 1.0D); diff --git a/CraftBukkit-Patches/0107-Guard-Entity-List.patch b/CraftBukkit-Patches/0107-Guard-Entity-List.patch index 92d7749e03..be88e93f74 100644 --- a/CraftBukkit-Patches/0107-Guard-Entity-List.patch +++ b/CraftBukkit-Patches/0107-Guard-Entity-List.patch @@ -1,11 +1,11 @@ -From 5b32db6f24afeaabf5d2d43778d4436de3cff6fc Mon Sep 17 00:00:00 2001 +From 6b67defb92e04c855fb01fe6a1bddd7ebe746cd4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 10 Mar 2014 09:03:28 +1100 Subject: [PATCH] Guard Entity List diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index eb6772a..121b3d5 100644 +index e557b4f..091b04d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -31,7 +31,32 @@ import org.bukkit.event.weather.ThunderChangeEvent; @@ -50,7 +50,7 @@ index eb6772a..121b3d5 100644 protected final gnu.trove.map.hash.TLongShortHashMap chunkTickList; protected float growthOdds = 100; protected float modifiedOdds = 100; -@@ -1347,6 +1373,7 @@ public abstract class World implements IBlockAccess { +@@ -1354,6 +1380,7 @@ public abstract class World implements IBlockAccess { org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot @@ -58,7 +58,7 @@ index eb6772a..121b3d5 100644 // CraftBukkit start - Use field for loop variable for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) { entity = (Entity) this.entityList.get(this.tickPosition); -@@ -1395,12 +1422,15 @@ public abstract class World implements IBlockAccess { +@@ -1402,12 +1429,15 @@ public abstract class World implements IBlockAccess { this.getChunkAt(j, k).b(entity); } diff --git a/CraftBukkit-Patches/0108-Fix-ConcurrentModificationException-while-being-idle.patch b/CraftBukkit-Patches/0108-Fix-ConcurrentModificationException-while-being-idle.patch index 61b5804355..75494499f5 100644 --- a/CraftBukkit-Patches/0108-Fix-ConcurrentModificationException-while-being-idle.patch +++ b/CraftBukkit-Patches/0108-Fix-ConcurrentModificationException-while-being-idle.patch @@ -1,4 +1,4 @@ -From 200790a8046f0753d75f08cd8fc7fcfa923771b4 Mon Sep 17 00:00:00 2001 +From d42c7e1721e42d557b5763058c70678442f287b3 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 14 Jan 2014 20:11:25 +0000 Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked @@ -6,10 +6,10 @@ Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 121b3d5..fa3f5e0 100644 +index 091b04d..caf3244 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1120,23 +1120,24 @@ public abstract class World implements IBlockAccess { +@@ -1127,23 +1127,24 @@ public abstract class World implements IBlockAccess { this.players.remove(entity); this.everyoneSleeping(); } diff --git a/CraftBukkit-Patches/0115-Fix-TileEntities-getting-ticked-after-being-queued-f.patch b/CraftBukkit-Patches/0115-Fix-TileEntities-getting-ticked-after-being-queued-f.patch index 1f85c2da16..e7ddf6920d 100644 --- a/CraftBukkit-Patches/0115-Fix-TileEntities-getting-ticked-after-being-queued-f.patch +++ b/CraftBukkit-Patches/0115-Fix-TileEntities-getting-ticked-after-being-queued-f.patch @@ -1,4 +1,4 @@ -From 46d77f4798eef547b30a250a71e8a91c88bcd742 Mon Sep 17 00:00:00 2001 +From 2d9138dc3f2c4ca53182bcd514bdb54b9f0eaa67 Mon Sep 17 00:00:00 2001 From: FrozenBrain Date: Sun, 23 Mar 2014 01:49:13 +0100 Subject: [PATCH] Fix TileEntities getting ticked after being queued for @@ -6,10 +6,10 @@ Subject: [PATCH] Fix TileEntities getting ticked after being queued for diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index fa3f5e0..4ff8211 100644 +index caf3244..64ac7ee 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1436,6 +1436,12 @@ public abstract class World implements IBlockAccess { +@@ -1443,6 +1443,12 @@ public abstract class World implements IBlockAccess { timings.entityTick.stopTiming(); // Spigot this.methodProfiler.c("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot @@ -22,7 +22,7 @@ index fa3f5e0..4ff8211 100644 this.M = true; Iterator iterator = this.tileEntityList.iterator(); -@@ -1484,10 +1490,6 @@ public abstract class World implements IBlockAccess { +@@ -1491,10 +1497,6 @@ public abstract class World implements IBlockAccess { timings.tileEntityTick.stopTiming(); // Spigot timings.tileEntityPending.startTiming(); // Spigot this.M = false; diff --git a/CraftBukkit-Patches/0137-Prevent-NoClassDefError-crash-and-notify-on-crash.patch b/CraftBukkit-Patches/0137-Prevent-NoClassDefError-crash-and-notify-on-crash.patch index 71994afc32..aebe2eee33 100644 --- a/CraftBukkit-Patches/0137-Prevent-NoClassDefError-crash-and-notify-on-crash.patch +++ b/CraftBukkit-Patches/0137-Prevent-NoClassDefError-crash-and-notify-on-crash.patch @@ -1,11 +1,11 @@ -From dbe079e5ee8a410fca79db006bde74fbdbae3f9c Mon Sep 17 00:00:00 2001 +From 874cf032c7bff55b2320913d064aa4713a861b40 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 21 Apr 2014 12:43:08 +0100 Subject: [PATCH] Prevent NoClassDefError crash and notify on crash diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4ff8211..3874fab 100644 +index 64ac7ee..a879ae3 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -111,6 +111,8 @@ public abstract class World implements IBlockAccess { @@ -17,7 +17,7 @@ index 4ff8211..3874fab 100644 public static long chunkToKey(int x, int z) { -@@ -621,6 +623,9 @@ public abstract class World implements IBlockAccess { +@@ -628,6 +630,9 @@ public abstract class World implements IBlockAccess { // CraftBukkit end block1.doPhysics(this, i, j, k, block);