mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-16 15:45:23 +01:00
SPIGOT-6097: Zoglins not attacking mobs
This commit is contained in:
parent
850e7b1400
commit
bad55dbb5a
@ -18,7 +18,7 @@
|
||||
private void d(E e0) {
|
||||
+ // CraftBukkit start
|
||||
+ EntityLiving old = e0.getBehaviorController().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null);
|
||||
+ EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(e0, old, (old != null && !old.isAlive()) ? EntityTargetEvent.TargetReason.TARGET_DIED : EntityTargetEvent.TargetReason.FORGOT_TARGET);
|
||||
+ EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(e0, null, (old != null && !old.isAlive()) ? EntityTargetEvent.TargetReason.TARGET_DIED : EntityTargetEvent.TargetReason.FORGOT_TARGET);
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
|
Loading…
Reference in New Issue
Block a user