mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
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:
parent
05512942db
commit
8f0c1aed6b
2 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue