1
0
forked from xjboss/KCauldronX
KCauldronX/patches/net/minecraft/entity/ai/EntityAIPanic.java.patch
2015-03-22 20:38:04 +03:00

27 lines
894 B
Diff

--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIPanic.java
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIPanic.java
@@ -3,6 +3,8 @@
import net.minecraft.entity.EntityCreature;
import net.minecraft.util.Vec3;
+import net.minecraft.entity.EntityLivingBase; // CraftBukkit
+
public class EntityAIPanic extends EntityAIBase
{
private EntityCreature theEntityCreature;
@@ -50,6 +52,14 @@
public boolean continueExecuting()
{
+ // CraftBukkit start - introduce a temporary timeout hack until this is fixed properly
+ if ((this.theEntityCreature.ticksExisted - this.theEntityCreature.func_142015_aE()) > 100)
+ {
+ this.theEntityCreature.setRevengeTarget((EntityLivingBase) null);
+ return false;
+ }
+
+ // CraftBukkit end
return !this.theEntityCreature.getNavigator().noPath();
}
}