public static boolean brainwashEntity(EntityLiving entity, List<IMob> mobs) {
EntityLivingBase target = entity.getAttackTarget();
boolean did = false;
if(target == null || !(target instanceof IMob)) {
IMob newTarget;
do newTarget = mobs.get(entity.worldObj.rand.nextInt(mobs.size()));
while(newTarget == entity);
if(newTarget instanceof EntityLiving) {
List<EntityAITaskEntry> entries = new ArrayList(entity.tasks.taskEntries);