SPIGOT-4378: Fix mistakenly included code

This commit is contained in:
md_5 2018-09-16 08:16:03 +10:00
parent a4bdecff65
commit 6166843699

View file

@ -565,7 +565,25 @@
} }
@Nullable @Nullable
@@ -1972,6 +2270,11 @@ @@ -1852,8 +2150,16 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
+ // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs
+ if (entity instanceof EntityInsentient) {
+ EntityInsentient entityinsentient = (EntityInsentient) entity;
+ if (entityinsentient.isTypeNotPersistent() && entityinsentient.isPersistent()) {
+ continue;
+ }
+ }
- if (!(entity instanceof EntityInsentient) || !((EntityInsentient) entity).isPersistent()) {
+ if (true || !(entity instanceof EntityInsentient) || !((EntityInsentient) entity).isPersistent()) {
+ // CraftBukkit end
if (oclass.isAssignableFrom(entity.getClass())) {
++j;
}
@@ -1972,6 +2278,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);
@ -577,7 +595,7 @@
if (predicate.test(entityhuman1)) { if (predicate.test(entityhuman1)) {
double d5 = entityhuman1.d(d0, d1, d2); double d5 = entityhuman1.d(d0, d1, d2);
@@ -2164,6 +2467,16 @@ @@ -2164,6 +2475,16 @@
public void everyoneSleeping() {} public void everyoneSleeping() {}
@ -594,7 +612,7 @@
public float g(float f) { public float g(float f) {
return (this.q + (this.r - this.q) * f) * this.i(f); return (this.q + (this.r - this.q) * f) * this.i(f);
} }
@@ -2325,7 +2638,7 @@ @@ -2325,7 +2646,7 @@
int l = j * 16 + 8 - blockposition.getZ(); int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true; boolean flag = true;