diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-31 14:00:55 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-01 22:28:44 -0600 |
commit | 8f0c1aed6bb7d3dd24baffaa7e01d2297f159995 (patch) | |
tree | a2828d26a6fb3da10ea720ec4293fe1afccb12c9 /src/main | |
parent | 05512942db5b6f1527dade5f98f295f14503a1d1 (diff) | |
download | craftbukkit-8f0c1aed6bb7d3dd24baffaa7e01d2297f159995.tar craftbukkit-8f0c1aed6bb7d3dd24baffaa7e01d2297f159995.tar.gz craftbukkit-8f0c1aed6bb7d3dd24baffaa7e01d2297f159995.tar.lz craftbukkit-8f0c1aed6bb7d3dd24baffaa7e01d2297f159995.tar.xz craftbukkit-8f0c1aed6bb7d3dd24baffaa7e01d2297f159995.zip |
Fix "setSitting" on tameable animals. Fixes BUKKIT-1534
This makes it so animals (tame or not) will sit properly and not move
around.
Wild animals that are sitting may override the sitting position if
they are attacking.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalSit.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/src/main/java/net/minecraft/server/PathfinderGoalSit.java index 6b34a97c..3b9b97a5 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSit.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSit.java @@ -12,7 +12,7 @@ public class PathfinderGoalSit extends PathfinderGoal { public boolean a() { if (!this.a.isTamed()) { - return false; + return this.b && this.a.aG() == null; // CraftBukkit - Allow sitting for wild animals } else if (this.a.H()) { return false; } else if (!this.a.onGround) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java index 8fb8629b..0134bda7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -62,8 +62,7 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat } public void setSitting(boolean sitting) { - getHandle().setSitting(sitting); - getHandle().setPathEntity(null); + getHandle().q().a(sitting); } @Override |