public class EntityAIWander extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
private EntityCreature |
entity |
private int |
executionChance |
private boolean |
mustUpdate |
private double |
speed |
private double |
xPosition |
private double |
yPosition |
private double |
zPosition |
Constructor and Description |
---|
EntityAIWander(EntityCreature creatureIn,
double speedIn) |
EntityAIWander(EntityCreature creatureIn,
double speedIn,
int chance) |
Modifier and Type | Method and Description |
---|---|
boolean |
continueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
void |
makeUpdate()
Makes task to bypass chance
|
void |
setExecutionChance(int newchance)
Changes task random possibility for execution
|
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
getMutexBits, isInterruptible, resetTask, setMutexBits, updateTask
private EntityCreature entity
private double xPosition
private double yPosition
private double zPosition
private double speed
private int executionChance
private boolean mustUpdate
public EntityAIWander(EntityCreature creatureIn, double speedIn)
public EntityAIWander(EntityCreature creatureIn, double speedIn, int chance)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
public boolean continueExecuting()
continueExecuting
in class EntityAIBase
public void startExecuting()
startExecuting
in class EntityAIBase
public void makeUpdate()
public void setExecutionChance(int newchance)