geforkt von Mirrors/Paper
SPIGOT-2944: Just apply filtering to players
Dieser Commit ist enthalten in:
Ursprung
a86731306b
Commit
13a5b12206
@ -341,17 +341,19 @@
|
|||||||
this.c(entity);
|
this.c(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -872,6 +1095,9 @@
|
@@ -872,6 +1095,11 @@
|
||||||
int l = MathHelper.f(axisalignedbb.e) + 1;
|
int l = MathHelper.f(axisalignedbb.e) + 1;
|
||||||
int i1 = MathHelper.floor(axisalignedbb.c) - 1;
|
int i1 = MathHelper.floor(axisalignedbb.c) - 1;
|
||||||
int j1 = MathHelper.f(axisalignedbb.f) + 1;
|
int j1 = MathHelper.f(axisalignedbb.f) + 1;
|
||||||
+ // CraftBukkit start - filter out large ranges
|
+ // 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);
|
+ 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
|
+ // CraftBukkit end
|
||||||
WorldBorder worldborder = this.getWorldBorder();
|
WorldBorder worldborder = this.getWorldBorder();
|
||||||
boolean flag1 = entity != null && entity.br();
|
boolean flag1 = entity != null && entity.br();
|
||||||
boolean flag2 = entity != null && this.g(entity);
|
boolean flag2 = entity != null && this.g(entity);
|
||||||
@@ -974,7 +1200,7 @@
|
@@ -974,7 +1202,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(AxisAlignedBB axisalignedbb) {
|
public boolean a(AxisAlignedBB axisalignedbb) {
|
||||||
@ -360,7 +362,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int a(float f) {
|
public int a(float f) {
|
||||||
@@ -1044,6 +1270,11 @@
|
@@ -1044,6 +1272,11 @@
|
||||||
|
|
||||||
for (i = 0; i < this.j.size(); ++i) {
|
for (i = 0; i < this.j.size(); ++i) {
|
||||||
entity = (Entity) this.j.get(i);
|
entity = (Entity) this.j.get(i);
|
||||||
@ -372,7 +374,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
++entity.ticksLived;
|
++entity.ticksLived;
|
||||||
@@ -1092,8 +1323,10 @@
|
@@ -1092,8 +1325,10 @@
|
||||||
CrashReportSystemDetails crashreportsystemdetails1;
|
CrashReportSystemDetails crashreportsystemdetails1;
|
||||||
CrashReport crashreport1;
|
CrashReport crashreport1;
|
||||||
|
|
||||||
@ -385,7 +387,7 @@
|
|||||||
Entity entity1 = entity.bB();
|
Entity entity1 = entity.bB();
|
||||||
|
|
||||||
if (entity1 != null) {
|
if (entity1 != null) {
|
||||||
@@ -1126,7 +1359,7 @@
|
@@ -1126,7 +1361,7 @@
|
||||||
this.getChunkAt(j, l).b(entity);
|
this.getChunkAt(j, l).b(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +396,7 @@
|
|||||||
this.c(entity);
|
this.c(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1135,6 +1368,13 @@
|
@@ -1135,6 +1370,13 @@
|
||||||
|
|
||||||
this.methodProfiler.c("blockEntities");
|
this.methodProfiler.c("blockEntities");
|
||||||
this.M = true;
|
this.M = true;
|
||||||
@ -408,7 +410,7 @@
|
|||||||
Iterator iterator = this.tileEntityListTick.iterator();
|
Iterator iterator = this.tileEntityListTick.iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@@ -1145,7 +1385,7 @@
|
@@ -1145,7 +1387,7 @@
|
||||||
|
|
||||||
if (this.isLoaded(blockposition) && this.N.a(blockposition)) {
|
if (this.isLoaded(blockposition) && this.N.a(blockposition)) {
|
||||||
try {
|
try {
|
||||||
@ -417,7 +419,7 @@
|
|||||||
((ITickable) tileentity).F_();
|
((ITickable) tileentity).F_();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
} catch (Throwable throwable2) {
|
} catch (Throwable throwable2) {
|
||||||
@@ -1167,11 +1407,13 @@
|
@@ -1167,11 +1409,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.M = false;
|
this.M = false;
|
||||||
@ -431,7 +433,7 @@
|
|||||||
|
|
||||||
this.methodProfiler.c("pendingBlockEntities");
|
this.methodProfiler.c("pendingBlockEntities");
|
||||||
if (!this.b.isEmpty()) {
|
if (!this.b.isEmpty()) {
|
||||||
@@ -1179,9 +1421,11 @@
|
@@ -1179,9 +1423,11 @@
|
||||||
TileEntity tileentity1 = (TileEntity) this.b.get(i1);
|
TileEntity tileentity1 = (TileEntity) this.b.get(i1);
|
||||||
|
|
||||||
if (!tileentity1.y()) {
|
if (!tileentity1.y()) {
|
||||||
@ -443,7 +445,7 @@
|
|||||||
|
|
||||||
if (this.isLoaded(tileentity1.getPosition())) {
|
if (this.isLoaded(tileentity1.getPosition())) {
|
||||||
Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition());
|
Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition());
|
||||||
@@ -1189,6 +1433,12 @@
|
@@ -1189,6 +1435,12 @@
|
||||||
|
|
||||||
chunk.a(tileentity1.getPosition(), tileentity1);
|
chunk.a(tileentity1.getPosition(), tileentity1);
|
||||||
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
|
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
|
||||||
@ -456,7 +458,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1243,7 +1493,10 @@
|
@@ -1243,7 +1495,10 @@
|
||||||
int j = MathHelper.floor(entity.locZ);
|
int j = MathHelper.floor(entity.locZ);
|
||||||
boolean flag1 = true;
|
boolean flag1 = true;
|
||||||
|
|
||||||
@ -468,7 +470,7 @@
|
|||||||
entity.M = entity.locX;
|
entity.M = entity.locX;
|
||||||
entity.N = entity.locY;
|
entity.N = entity.locY;
|
||||||
entity.O = entity.locZ;
|
entity.O = entity.locZ;
|
||||||
@@ -1547,11 +1800,18 @@
|
@@ -1547,11 +1802,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +489,7 @@
|
|||||||
TileEntity tileentity = null;
|
TileEntity tileentity = null;
|
||||||
|
|
||||||
if (this.M) {
|
if (this.M) {
|
||||||
@@ -1586,6 +1846,14 @@
|
@@ -1586,6 +1848,14 @@
|
||||||
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
||||||
if (!this.E(blockposition)) {
|
if (!this.E(blockposition)) {
|
||||||
if (tileentity != null && !tileentity.y()) {
|
if (tileentity != null && !tileentity.y()) {
|
||||||
@ -502,7 +504,7 @@
|
|||||||
if (this.M) {
|
if (this.M) {
|
||||||
tileentity.setPosition(blockposition);
|
tileentity.setPosition(blockposition);
|
||||||
Iterator iterator = this.b.iterator();
|
Iterator iterator = this.b.iterator();
|
||||||
@@ -1745,6 +2013,14 @@
|
@@ -1745,6 +2015,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.o = MathHelper.a(this.o, 0.0F, 1.0F);
|
this.o = MathHelper.a(this.o, 0.0F, 1.0F);
|
||||||
@ -517,7 +519,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1876,7 +2152,10 @@
|
@@ -1876,7 +2154,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
|
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
|
||||||
@ -529,7 +531,7 @@
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -2043,7 +2322,7 @@
|
@@ -2043,7 +2324,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
@ -538,7 +540,7 @@
|
|||||||
arraylist.add(entity);
|
arraylist.add(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2058,7 +2337,7 @@
|
@@ -2058,7 +2339,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
@ -547,7 +549,7 @@
|
|||||||
arraylist.add(entity);
|
arraylist.add(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2107,7 +2386,7 @@
|
@@ -2107,7 +2388,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,7 +558,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -2128,8 +2407,17 @@
|
@@ -2128,8 +2409,17 @@
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
@ -576,7 +578,7 @@
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2138,12 +2426,18 @@
|
@@ -2138,12 +2428,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(Collection<Entity> collection) {
|
public void a(Collection<Entity> collection) {
|
||||||
@ -596,7 +598,7 @@
|
|||||||
this.b(entity);
|
this.b(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2157,7 +2451,13 @@
|
@@ -2157,7 +2453,13 @@
|
||||||
IBlockData iblockdata = this.getType(blockposition);
|
IBlockData iblockdata = this.getType(blockposition);
|
||||||
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition);
|
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition);
|
||||||
|
|
||||||
@ -611,7 +613,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int K() {
|
public int K() {
|
||||||
@@ -2267,6 +2567,11 @@
|
@@ -2267,6 +2569,11 @@
|
||||||
|
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
||||||
@ -623,7 +625,7 @@
|
|||||||
|
|
||||||
if (predicate.apply(entityhuman1)) {
|
if (predicate.apply(entityhuman1)) {
|
||||||
double d5 = entityhuman1.d(d0, d1, d2);
|
double d5 = entityhuman1.d(d0, d1, d2);
|
||||||
@@ -2435,6 +2740,16 @@
|
@@ -2435,6 +2742,16 @@
|
||||||
|
|
||||||
public void everyoneSleeping() {}
|
public void everyoneSleeping() {}
|
||||||
|
|
||||||
@ -640,7 +642,7 @@
|
|||||||
public float h(float f) {
|
public float h(float f) {
|
||||||
return (this.p + (this.q - this.p) * f) * this.j(f);
|
return (this.p + (this.q - this.p) * f) * this.j(f);
|
||||||
}
|
}
|
||||||
@@ -2652,7 +2967,7 @@
|
@@ -2652,7 +2969,7 @@
|
||||||
int l = j * 16 + 8 - blockposition.getZ();
|
int l = j * 16 + 8 - blockposition.getZ();
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren