mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix a ConcurrentModificationException in the antixray
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
1fc8df93b1
commit
c37f92e34d
6 changed files with 42 additions and 23 deletions
|
@ -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 <md_5@live.com.au>
|
||||
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<BlockState> 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
|
||||
|
||||
|
|
|
@ -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 <md_5@live.com.au>
|
||||
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);
|
||||
|
||||
|
|
|
@ -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 <git@md-5.net>
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 200790a8046f0753d75f08cd8fc7fcfa923771b4 Mon Sep 17 00:00:00 2001
|
||||
From d42c7e1721e42d557b5763058c70678442f287b3 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 46d77f4798eef547b30a250a71e8a91c88bcd742 Mon Sep 17 00:00:00 2001
|
||||
From 2d9138dc3f2c4ca53182bcd514bdb54b9f0eaa67 Mon Sep 17 00:00:00 2001
|
||||
From: FrozenBrain <carstenbamsti@googlemail.com>
|
||||
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;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From dbe079e5ee8a410fca79db006bde74fbdbae3f9c Mon Sep 17 00:00:00 2001
|
||||
From 874cf032c7bff55b2320913d064aa4713a861b40 Mon Sep 17 00:00:00 2001
|
||||
From: David <dmck2b@gmail.com>
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue