summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/PathfinderGoalSit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalSit.java')
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalSit.java26
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;
}
}