From 533290e290f744875c48c7b9f3a03ab6c23cccb2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 23 Jun 2019 09:14:01 +1000 Subject: [PATCH] SPIGOT-5100: Console warning from pig zombie targeting --- nms-patches/EntityPigZombie.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/EntityPigZombie.patch b/nms-patches/EntityPigZombie.patch index b6e99b4336..a76033f4f7 100644 --- a/nms-patches/EntityPigZombie.patch +++ b/nms-patches/EntityPigZombie.patch @@ -31,3 +31,12 @@ this.soundDelay = this.random.nextInt(40); if (entity instanceof EntityLiving) { this.setLastDamager((EntityLiving) entity); +@@ -217,7 +228,7 @@ + @Override + protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) { + if (entityinsentient instanceof EntityPigZombie && this.e.hasLineOfSight(entityliving) && ((EntityPigZombie) entityinsentient).a((Entity) entityliving)) { +- entityinsentient.setGoalTarget(entityliving); ++ entityinsentient.setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, true); // CraftBukkit + } + + }