diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-31 23:40:59 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-01 22:28:43 -0600 |
commit | 05512942db5b6f1527dade5f98f295f14503a1d1 (patch) | |
tree | f584f9be83ca5a01426a9c9f785fb5207f77e7ea /src/main | |
parent | 95098c94355cb8dda9a0cd045b62d390fcc416e1 (diff) | |
download | craftbukkit-05512942db5b6f1527dade5f98f295f14503a1d1.tar craftbukkit-05512942db5b6f1527dade5f98f295f14503a1d1.tar.gz craftbukkit-05512942db5b6f1527dade5f98f295f14503a1d1.tar.lz craftbukkit-05512942db5b6f1527dade5f98f295f14503a1d1.tar.xz craftbukkit-05512942db5b6f1527dade5f98f295f14503a1d1.zip |
Add PathfinderGoalSit for diff visibility
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalSit.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/src/main/java/net/minecraft/server/PathfinderGoalSit.java new file mode 100644 index 00000000..6b34a97c --- /dev/null +++ b/src/main/java/net/minecraft/server/PathfinderGoalSit.java @@ -0,0 +1,39 @@ +package net.minecraft.server; + +public class PathfinderGoalSit extends PathfinderGoal { + + private EntityTameableAnimal a; + private boolean b = false; + + public PathfinderGoalSit(EntityTameableAnimal entitytameableanimal) { + this.a = entitytameableanimal; + this.a(5); + } + + public boolean a() { + if (!this.a.isTamed()) { + return false; + } else if (this.a.H()) { + return false; + } else if (!this.a.onGround) { + return false; + } else { + EntityLiving entityliving = this.a.getOwner(); + + return entityliving == null ? true : (this.a.e(entityliving) < 144.0D && entityliving.aC() != null ? false : this.b); + } + } + + public void c() { + this.a.getNavigation().g(); + this.a.setSitting(true); + } + + public void d() { + this.a.setSitting(false); + } + + public void a(boolean flag) { + this.b = flag; + } +} |