summaryrefslogtreecommitdiffstats
path: root/nms-patches/World.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-07-08 22:42:08 +0100
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-07-08 22:42:08 +0100
commite3b5669be1142f4ad4f8d0c9b850d058ae6a026d (patch)
treeb41bbf73b1f7d766a39a0b12210cdb961d2f3caa /nms-patches/World.patch
parente91aed81b37a81a73dd89a48f53931948b896cc1 (diff)
downloadcraftbukkit-e3b5669be1142f4ad4f8d0c9b850d058ae6a026d.tar
craftbukkit-e3b5669be1142f4ad4f8d0c9b850d058ae6a026d.tar.gz
craftbukkit-e3b5669be1142f4ad4f8d0c9b850d058ae6a026d.tar.lz
craftbukkit-e3b5669be1142f4ad4f8d0c9b850d058ae6a026d.tar.xz
craftbukkit-e3b5669be1142f4ad4f8d0c9b850d058ae6a026d.zip
SPIGOT-915: Remove the getEntities filter
Didn't fix the issue like i'd hoped and broke a few plugins in the process. Ideally though plugins shouldn't be using it for large ranges because it is inefficient
Diffstat (limited to 'nms-patches/World.patch')
-rw-r--r--nms-patches/World.patch32
1 files changed, 9 insertions, 23 deletions
diff --git a/nms-patches/World.patch b/nms-patches/World.patch
index f3e5266e..484a9e04 100644
--- a/nms-patches/World.patch
+++ b/nms-patches/World.patch
@@ -533,21 +533,7 @@
return false;
} else {
int i = 0;
-@@ -2024,6 +2296,13 @@
- int k = MathHelper.floor((axisalignedbb.c - 2.0D) / 16.0D);
- int l = MathHelper.floor((axisalignedbb.f + 2.0D) / 16.0D);
-
-+ // CraftBukkit start - filter out large ranges
-+ if (j - i > 10 || l - k > 10) {
-+ getServer().getLogger().log(java.util.logging.Level.WARNING, "Filtered out large getEntities call {0},{1} {2},{3}", new Object[]{i, j, k, j});
-+ return arraylist;
-+ }
-+ // CraftBukkit end
-+
- for (int i1 = i; i1 <= j; ++i1) {
- for (int j1 = k; j1 <= l; ++j1) {
- if (this.isChunkLoaded(i1, j1, true)) {
-@@ -2042,7 +2321,7 @@
+@@ -2042,7 +2314,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -556,7 +542,7 @@
arraylist.add(entity);
}
}
-@@ -2057,7 +2336,7 @@
+@@ -2057,7 +2329,7 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -565,7 +551,7 @@
arraylist.add(entity);
}
}
-@@ -2105,7 +2384,7 @@
+@@ -2105,7 +2377,7 @@
}
}
@@ -574,7 +560,7 @@
}
public Entity a(int i) {
-@@ -2125,8 +2404,17 @@
+@@ -2125,8 +2397,17 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -594,7 +580,7 @@
++i;
}
}
-@@ -2135,12 +2423,18 @@
+@@ -2135,12 +2416,18 @@
}
public void b(Collection<Entity> collection) {
@@ -614,7 +600,7 @@
this.a(entity);
}
-@@ -2154,7 +2448,13 @@
+@@ -2154,7 +2441,13 @@
Block block1 = this.getType(blockposition).getBlock();
AxisAlignedBB axisalignedbb = flag ? null : block.a(this, blockposition, block.getBlockData());
@@ -629,7 +615,7 @@
}
public int F() {
-@@ -2253,6 +2553,11 @@
+@@ -2253,6 +2546,11 @@
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
@@ -641,7 +627,7 @@
if (IEntitySelector.d.apply(entityhuman1)) {
double d5 = entityhuman1.e(d0, d1, d2);
-@@ -2369,6 +2674,16 @@
+@@ -2369,6 +2667,16 @@
public void everyoneSleeping() {}
@@ -658,7 +644,7 @@
public float h(float f) {
return (this.q + (this.r - this.q) * f) * this.j(f);
}
-@@ -2592,6 +2907,6 @@
+@@ -2592,6 +2900,6 @@
int l = j * 16 + 8 - blockposition.getZ();
short short0 = 128;