mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
SPIGOT-5100: Console warning from pig zombie targeting
This commit is contained in:
parent
6dde4b9fda
commit
533290e290
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue