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.
This commit is contained in:
feildmaster 2012-12-31 14:00:55 -06:00
parent 05512942db
commit 8f0c1aed6b
2 changed files with 2 additions and 3 deletions

View file

@ -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) {

View file

@ -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