diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java deleted file mode 100644 index 0c08df38..00000000 --- a/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.minecraft.server; - -import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit - -public class PathfinderGoalOcelotAttack extends PathfinderGoal { - - World a; - EntityInsentient b; - EntityLiving c; - int d; - - public PathfinderGoalOcelotAttack(EntityInsentient entityinsentient) { - this.b = entityinsentient; - this.a = entityinsentient.world; - this.a(3); - } - - public boolean a() { - EntityLiving entityliving = this.b.getGoalTarget(); - - if (entityliving == null) { - return false; - } else { - this.c = entityliving; - return true; - } - } - - public boolean b() { - return !this.c.isAlive() ? false : (this.b.f(this.c) > 225.0D ? false : !this.b.getNavigation().g() || this.a()); - } - - 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(); - } - - public void e() { - this.b.getControllerLook().a(this.c, 30.0F, 30.0F); - double d0 = (double) (this.b.width * 2.0F * this.b.width * 2.0F); - double d1 = this.b.e(this.c.locX, this.c.boundingBox.b, this.c.locZ); - double d2 = 0.8D; - - if (d1 > d0 && d1 < 16.0D) { - d2 = 1.33D; - } else if (d1 < 225.0D) { - d2 = 0.6D; - } - - this.b.getNavigation().a((Entity) this.c, d2); - this.d = Math.max(this.d - 1, 0); - if (d1 <= d0) { - if (this.d <= 0) { - this.d = 20; - this.b.n(this.c); - } - } - } -} |