diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-07-01 06:03:00 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-07-01 12:10:06 -0500 |
commit | 6c09066e224ac85b8a6464eaf8f53edfeb4beda4 (patch) | |
tree | 573e05f4b148cb1891a1d3839175e501e6257442 /src/main/java/net/minecraft/server/PathfinderGoalSit.java | |
parent | f887b76a259e12468b28d82d1eced93f0b73bd6d (diff) | |
download | craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.gz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.lz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.xz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.zip |
Update CraftBukkit to 1.6.1
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalSit.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalSit.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/src/main/java/net/minecraft/server/PathfinderGoalSit.java index 031005ed..ff300bff 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSit.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSit.java @@ -2,38 +2,38 @@ package net.minecraft.server; public class PathfinderGoalSit extends PathfinderGoal { - private EntityTameableAnimal a; - private boolean b = false; + private EntityTameableAnimal entity; + private boolean willSit; public PathfinderGoalSit(EntityTameableAnimal entitytameableanimal) { - this.a = entitytameableanimal; + this.entity = entitytameableanimal; this.a(5); } public boolean a() { - if (!this.a.isTamed()) { - return this.b && this.a.getGoalTarget() == null; // CraftBukkit - Allow sitting for wild animals - } else if (this.a.G()) { + if (!this.entity.isTamed()) { + return this.willSit && this.entity.getGoalTarget() == null; // CraftBukkit - Allow sitting for wild animals + } else if (this.entity.G()) { return false; - } else if (!this.a.onGround) { + } else if (!this.entity.onGround) { return false; } else { - EntityLiving entityliving = this.a.getOwner(); + EntityLiving entityliving = this.entity.getOwner(); - return entityliving == null ? true : (this.a.e(entityliving) < 144.0D && entityliving.aF() != null ? false : this.b); + return entityliving == null ? true : (this.entity.e(entityliving) < 144.0D && entityliving.getLastDamager() != null ? false : this.willSit); } } public void c() { - this.a.getNavigation().g(); - this.a.setSitting(true); + this.entity.getNavigation().h(); + this.entity.setSitting(true); } public void d() { - this.a.setSitting(false); + this.entity.setSitting(false); } public void setSitting(boolean flag) { - this.b = flag; + this.willSit = flag; } } |