mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Add timeout for Panic goal. Fixes BUKKIT-4531
This commit is contained in:
parent
ab36dbb6a9
commit
a466e0aa6c
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,12 @@ public class PathfinderGoalPanic extends PathfinderGoal {
|
|||
}
|
||||
|
||||
public boolean b() {
|
||||
// CraftBukkit start - introduce a temporary timeout hack until this is fixed properly
|
||||
if ((this.a.ticksLived - this.a.aE()) > 100) {
|
||||
this.a.b((EntityLiving) null);
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
return !this.a.getNavigation().g();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue