Thanks for the reply Ewe. Yes, I have tried it -> "they will move a few blocks (the x offset I provide) then wait before moving again." I duplicated and modified the entity wander ai method so that it simply walks in a straight line instead of randomly. Some of the code is still obfuscated but it doesn't seem to explicitely add a delay; here is what it looks like currently:
package com.dm.gatherer.ai;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.ai.RandomPositionGenerator;
import net.minecraft.util.Vec3;
public class ChopTrees extends EntityAIBase
{
private EntityCreature entity;
private double xPosition;
private double yPosition;
private double zPosition;
private double speed;
private int field_179481_f;
private boolean field_179482_g;
private static final String __OBFID = "CL_00001608";
public ChopTrees(EntityCreature p_i1648_1_, double p_i1648_2_)
{
this(p_i1648_1_, p_i1648_2_, 120);
}
public ChopTrees(EntityCreature p_i45887_1_, double p_i45887_2_, int p_i45887_4_)
{
this.entity = p_i45887_1_;
this.speed = p_i45887_2_;
this.field_179481_f = p_i45887_4_;
this.setMutexBits(1);
}
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (!this.field_179482_g)
{
if (this.entity.getAge() >= 100)
{
return false;
}
if (this.entity.getRNG().nextInt(this.field_179481_f) != 0)
{
return false;
}
}
Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);
if (vec3 == null)
{
return false;
}
else
{
this.xPosition = vec3.xCoord;
this.yPosition = vec3.yCoord;
this.zPosition = vec3.zCoord;
this.field_179482_g = false;
return true;
}
}
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting()
{
return !this.entity.getNavigator().noPath();
}
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
//this.entity.moveEntity(3, 0, 0);
this.entity.getNavigator().tryMoveToXYZ(this.entity.posX+3, this.entity.posY, this.entity.posZ, this.speed);
}
public void func_179480_f()
{
this.field_179482_g = true;
}
public void func_179479_b(int p_179479_1_)
{
this.field_179481_f = p_179479_1_;
}
}
The only other ai method added to this particular entity on construction is the swimming ai; this custom ChopTrees ai method is priority 2. I'll try commenting out some of the conditionals in shouldExecute() to see if, perhaps, one of those is sending the false flag periodically. Open to suggestions!