diff options
author | EvilSeph <evilseph@gmail.com> | 2013-08-01 22:13:25 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-08-02 19:20:26 -0400 |
commit | a466e0aa6c0e1352fc69b9520c6b70129b11e018 (patch) | |
tree | bdaf69ef43b182dcc9e352a185296b741918b101 /src | |
parent | ab36dbb6a937ffa61f76716cddf0fb40070b8d35 (diff) | |
download | craftbukkit-a466e0aa6c0e1352fc69b9520c6b70129b11e018.tar craftbukkit-a466e0aa6c0e1352fc69b9520c6b70129b11e018.tar.gz craftbukkit-a466e0aa6c0e1352fc69b9520c6b70129b11e018.tar.lz craftbukkit-a466e0aa6c0e1352fc69b9520c6b70129b11e018.tar.xz craftbukkit-a466e0aa6c0e1352fc69b9520c6b70129b11e018.zip |
Add timeout for Panic goal. Fixes BUKKIT-4531
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalPanic.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java index d58911e4..cbf1976c 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java @@ -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(); } } |