SPIGOT-2948: Alter filtering logic

This commit is contained in:
md_5 2016-12-21 17:12:39 +11:00
parent 8ea0c87f51
commit fb50a80d0f

View File

@ -346,7 +346,7 @@
int i1 = MathHelper.floor(axisalignedbb.c) - 1;
int j1 = MathHelper.f(axisalignedbb.f) + 1;
+ // CraftBukkit start - filter out large ranges
+ com.google.common.base.Preconditions.checkArgument(j - i <= 32 && l - k <= 32 && j1 - i1 <= 32, "Filtered out large getCubes call %s,%s %s,%s %s,%s", i, j, k, l, i1, j1);
+ 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();