From 616684369995a55b245267ffbc369616cc8c5fd0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Sep 2018 08:16:03 +1000 Subject: [PATCH] SPIGOT-4378: Fix mistakenly included code --- nms-patches/World.patch | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/nms-patches/World.patch b/nms-patches/World.patch index 02f82ee78b..10d0c32187 100644 --- a/nms-patches/World.patch +++ b/nms-patches/World.patch @@ -565,7 +565,25 @@ } @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) { EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); @@ -577,7 +595,7 @@ if (predicate.test(entityhuman1)) { double d5 = entityhuman1.d(d0, d1, d2); -@@ -2164,6 +2467,16 @@ +@@ -2164,6 +2475,16 @@ public void everyoneSleeping() {} @@ -594,7 +612,7 @@ public float g(float 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(); boolean flag = true;