/// <summary> /// Time remaining during which the Animal is sped up and flees. /// </summary> protected virtual void UpdateWanderPath() { Profiler.StartSection("stroll"); bool flag = false; int i = -1; int j = -1; int k = -1; float f = -99999F; for (int l = 0; l < 10; l++) { int i1 = MathHelper2.Floor_double((PosX + (double)Rand.Next(13)) - 6D); int j1 = MathHelper2.Floor_double((PosY + (double)Rand.Next(7)) - 3D); int k1 = MathHelper2.Floor_double((PosZ + (double)Rand.Next(13)) - 6D); float f1 = GetBlockPathWeight(i1, j1, k1); if (f1 > f) { f = f1; i = i1; j = j1; k = k1; flag = true; } } if (flag) { PathToEntity = WorldObj.GetEntityPathToXYZ(this, i, j, k, 10F, true, false, false, true); } Profiler.EndSection(); }