diff options
author | GJ <gjmcferrin@gmail.com> | 2014-02-05 11:56:37 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 10:43:06 -0500 |
commit | 890a4af12fce9c28dcc69aebf14078420293dc00 (patch) | |
tree | 05a1f7938e78c3040aac869a25678c07750c7b13 /src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java | |
parent | 3abba823151c87050fb7680c3a7194eb1fe5d64d (diff) | |
download | craftbukkit-890a4af12fce9c28dcc69aebf14078420293dc00.tar craftbukkit-890a4af12fce9c28dcc69aebf14078420293dc00.tar.gz craftbukkit-890a4af12fce9c28dcc69aebf14078420293dc00.tar.lz craftbukkit-890a4af12fce9c28dcc69aebf14078420293dc00.tar.xz craftbukkit-890a4af12fce9c28dcc69aebf14078420293dc00.zip |
[Bleeding] Call EntityTargetEvent in many new places.
Adds BUKKIT-5388, BUKKIT-5387, BUKKIT-5386, BUKKIT-5483, BUKKIT-5484.
Fixes BUKKIT-5389.
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java index 8baf68d3..0c08df38 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java @@ -1,5 +1,7 @@ package net.minecraft.server; +import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit + public class PathfinderGoalOcelotAttack extends PathfinderGoal { World a; @@ -29,6 +31,10 @@ public class PathfinderGoalOcelotAttack extends PathfinderGoal { } public void d() { + // CraftBukkit start + EntityTargetEvent.TargetReason reason = this.c.isAlive() ? EntityTargetEvent.TargetReason.FORGOT_TARGET : EntityTargetEvent.TargetReason.TARGET_DIED; + org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent(this.c, null, reason); + // CraftBukkit end this.c = null; this.b.getNavigation().h(); } |