--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java
@@ -20,11 +20,14 @@
     private double field_151495_j;
     private double field_151496_k;
     private static final String __OBFID = "CL_00001595";
+    private int failedPathFindingPenalty = 0;
+    private boolean canPenalize = false;
 
     public EntityAIAttackOnCollide(EntityCreature p_i1635_1_, Class p_i1635_2_, double p_i1635_3_, boolean p_i1635_5_)
     {
         this(p_i1635_1_, p_i1635_3_, p_i1635_5_);
         this.field_75444_h = p_i1635_2_;
+        canPenalize = field_75444_h == null || !net.minecraft.entity.player.EntityPlayer.class.isAssignableFrom(field_75444_h); //Only enable delaying when not targeting players.
     }
 
     public EntityAIAttackOnCollide(EntityCreature p_i1636_1_, double p_i1636_2_, boolean p_i1636_4_)
@@ -54,6 +57,19 @@
         }
         else
         {
+            if (canPenalize)
+            {
+                if (--this.field_75445_i <= 0)
+                {
+                    this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase);
+                    this.field_151497_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
+                    return this.field_75438_g != null;
+                }
+                else
+                {
+                    return true;
+                }
+            }
             this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(entitylivingbase);
             return this.field_75438_g != null;
         }
@@ -91,6 +107,23 @@
             this.field_151496_k = entitylivingbase.field_70161_v;
             this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
 
+            if (this.canPenalize)
+            {
+                this.field_151497_i += failedPathFindingPenalty;
+                if (this.field_75441_b.func_70661_as().func_75505_d() != null)
+                {
+                    net.minecraft.pathfinding.PathPoint finalPathPoint = this.field_75441_b.func_70661_as().func_75505_d().func_75870_c();
+                    if (finalPathPoint != null && entitylivingbase.func_70092_e(finalPathPoint.field_75839_a, finalPathPoint.field_75837_b, finalPathPoint.field_75838_c) < 1)
+                        failedPathFindingPenalty = 0;
+                    else
+                        failedPathFindingPenalty += 10;
+                }
+                else
+                {
+                    failedPathFindingPenalty += 10;
+                }
+            }
+
             if (d0 > 1024.0D)
             {
                 this.field_75445_i += 10;
