From 70bc70b4eefbf98cc624d693ffc4984c64360393 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 28 Dec 2016 09:50:40 +1100 Subject: SPIGOT-2966: Entirely remove problematic check --- nms-patches/World.patch | 58 ++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/nms-patches/World.patch b/nms-patches/World.patch index c093832c..8925146c 100644 --- a/nms-patches/World.patch +++ b/nms-patches/World.patch @@ -341,19 +341,7 @@ this.c(entity); } -@@ -872,6 +1095,11 @@ - int l = MathHelper.f(axisalignedbb.e) + 1; - int i1 = MathHelper.floor(axisalignedbb.c) - 1; - int j1 = MathHelper.f(axisalignedbb.f) + 1; -+ // CraftBukkit start - filter out large ranges -+ if (entity instanceof EntityPlayer) { -+ com.google.common.base.Preconditions.checkArgument((j - i) * (l - k) * (j1 - i1) <= 32 * 32 * 32, "Filtered out large getCubes call %s,%s %s,%s %s,%s", i, j, k, l, i1, j1); -+ } -+ // CraftBukkit end - WorldBorder worldborder = this.getWorldBorder(); - boolean flag1 = entity != null && entity.br(); - boolean flag2 = entity != null && this.g(entity); -@@ -974,7 +1202,7 @@ +@@ -974,7 +1197,7 @@ } public boolean a(AxisAlignedBB axisalignedbb) { @@ -362,7 +350,7 @@ } public int a(float f) { -@@ -1044,6 +1272,11 @@ +@@ -1044,6 +1267,11 @@ for (i = 0; i < this.j.size(); ++i) { entity = (Entity) this.j.get(i); @@ -374,7 +362,7 @@ try { ++entity.ticksLived; -@@ -1092,8 +1325,10 @@ +@@ -1092,8 +1320,10 @@ CrashReportSystemDetails crashreportsystemdetails1; CrashReport crashreport1; @@ -387,7 +375,7 @@ Entity entity1 = entity.bB(); if (entity1 != null) { -@@ -1126,7 +1361,7 @@ +@@ -1126,7 +1356,7 @@ this.getChunkAt(j, l).b(entity); } @@ -396,7 +384,7 @@ this.c(entity); } -@@ -1135,6 +1370,13 @@ +@@ -1135,6 +1365,13 @@ this.methodProfiler.c("blockEntities"); this.M = true; @@ -410,7 +398,7 @@ Iterator iterator = this.tileEntityListTick.iterator(); while (iterator.hasNext()) { -@@ -1145,7 +1387,7 @@ +@@ -1145,7 +1382,7 @@ if (this.isLoaded(blockposition) && this.N.a(blockposition)) { try { @@ -419,7 +407,7 @@ ((ITickable) tileentity).F_(); this.methodProfiler.b(); } catch (Throwable throwable2) { -@@ -1167,11 +1409,13 @@ +@@ -1167,11 +1404,13 @@ } this.M = false; @@ -433,7 +421,7 @@ this.methodProfiler.c("pendingBlockEntities"); if (!this.b.isEmpty()) { -@@ -1179,9 +1423,11 @@ +@@ -1179,9 +1418,11 @@ TileEntity tileentity1 = (TileEntity) this.b.get(i1); if (!tileentity1.y()) { @@ -445,7 +433,7 @@ if (this.isLoaded(tileentity1.getPosition())) { Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition()); -@@ -1189,6 +1435,12 @@ +@@ -1189,6 +1430,12 @@ chunk.a(tileentity1.getPosition(), tileentity1); this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); @@ -458,7 +446,7 @@ } } } -@@ -1243,7 +1495,10 @@ +@@ -1243,7 +1490,10 @@ int j = MathHelper.floor(entity.locZ); boolean flag1 = true; @@ -470,7 +458,7 @@ entity.M = entity.locX; entity.N = entity.locY; entity.O = entity.locZ; -@@ -1547,11 +1802,18 @@ +@@ -1547,11 +1797,18 @@ } } @@ -489,7 +477,7 @@ TileEntity tileentity = null; if (this.M) { -@@ -1586,6 +1848,14 @@ +@@ -1586,6 +1843,14 @@ public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { if (!this.E(blockposition)) { if (tileentity != null && !tileentity.y()) { @@ -504,7 +492,7 @@ if (this.M) { tileentity.setPosition(blockposition); Iterator iterator = this.b.iterator(); -@@ -1745,6 +2015,14 @@ +@@ -1745,6 +2010,14 @@ } this.o = MathHelper.a(this.o, 0.0F, 1.0F); @@ -519,7 +507,7 @@ } } } -@@ -1876,7 +2154,10 @@ +@@ -1876,7 +2149,10 @@ } public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) { @@ -531,7 +519,7 @@ return false; } else { int i = 0; -@@ -2043,7 +2324,7 @@ +@@ -2043,7 +2319,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -540,7 +528,7 @@ arraylist.add(entity); } } -@@ -2058,7 +2339,7 @@ +@@ -2058,7 +2334,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -549,7 +537,7 @@ arraylist.add(entity); } } -@@ -2107,7 +2388,7 @@ +@@ -2107,7 +2383,7 @@ } } @@ -558,7 +546,7 @@ } @Nullable -@@ -2128,8 +2409,17 @@ +@@ -2128,8 +2404,17 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -578,7 +566,7 @@ ++i; } } -@@ -2138,12 +2428,18 @@ +@@ -2138,12 +2423,18 @@ } public void a(Collection collection) { @@ -598,7 +586,7 @@ this.b(entity); } -@@ -2157,7 +2453,13 @@ +@@ -2157,7 +2448,13 @@ IBlockData iblockdata = this.getType(blockposition); AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition); @@ -613,7 +601,7 @@ } public int K() { -@@ -2267,6 +2569,11 @@ +@@ -2267,6 +2564,11 @@ for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); @@ -625,7 +613,7 @@ if (predicate.apply(entityhuman1)) { double d5 = entityhuman1.d(d0, d1, d2); -@@ -2435,6 +2742,16 @@ +@@ -2435,6 +2737,16 @@ public void everyoneSleeping() {} @@ -642,7 +630,7 @@ public float h(float f) { return (this.p + (this.q - this.p) * f) * this.j(f); } -@@ -2652,7 +2969,7 @@ +@@ -2652,7 +2964,7 @@ int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; -- cgit v1.2.3