@Override public void updateTask() { theRobit .getLookHelper() .setLookPositionWithEntity(theOwner, 6.0F, theRobit.getVerticalFaceSpeed() / 10); if (theRobit.getFollowing()) { if (--ticker <= 0) { ticker = 10; if (!thePathfinder.tryMoveToEntityLiving(theOwner, moveSpeed)) { if (theRobit.getDistanceSqToEntity(theOwner) >= 144.0D) { int x = MathHelper.floor_double(theOwner.posX) - 2; int y = MathHelper.floor_double(theOwner.posZ) - 2; int z = MathHelper.floor_double(theOwner.boundingBox.minY); for (int l = 0; l <= 4; ++l) { for (int i1 = 0; i1 <= 4; ++i1) { if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && theWorld.doesBlockHaveSolidTopSurface(theWorld, x + l, z - 1, y + i1) && !theWorld.getBlock(x + l, z, y + i1).isNormalCube() && !theWorld.getBlock(x + l, z + 1, y + i1).isNormalCube()) { theRobit.setLocationAndAngles( (x + l) + 0.5F, z, (y + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch); thePathfinder.clearPathEntity(); return; } } } } } } } }