From 6c09066e224ac85b8a6464eaf8f53edfeb4beda4 Mon Sep 17 00:00:00 2001 From: Nate Mortensen Date: Mon, 1 Jul 2013 06:03:00 -0500 Subject: Update CraftBukkit to 1.6.1 --- .../net/minecraft/server/PathfinderGoalSit.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/net/minecraft/server/PathfinderGoalSit.java') 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; } } -- cgit v1.2.3