public abstract class EntityAIMoveToBlock extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
protected BlockPos |
destinationBlock
Block to move to
|
private int |
field_179490_f |
private boolean |
isAboveDestination |
private double |
movementSpeed |
protected int |
runDelay
Controls task execution delay
|
private int |
searchLength |
private EntityCreature |
theEntity |
private int |
timeoutCounter |
Constructor and Description |
---|
EntityAIMoveToBlock(EntityCreature creature,
double speedIn,
int length) |
Modifier and Type | Method and Description |
---|---|
boolean |
continueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
protected boolean |
getIsAboveDestination() |
void |
resetTask()
Resets the task
|
private boolean |
searchForDestination()
Searches and sets new destination block and returns true if a suitable block (specified in
EntityAIMoveToBlock#shouldMoveTo(World,
BlockPos) ) can be found. |
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
protected abstract boolean |
shouldMoveTo(World worldIn,
BlockPos pos)
Return true to set given position as destination
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
void |
updateTask()
Updates the task
|
getMutexBits, isInterruptible, setMutexBits
private final EntityCreature theEntity
private final double movementSpeed
protected int runDelay
private int timeoutCounter
private int field_179490_f
protected BlockPos destinationBlock
private boolean isAboveDestination
private int searchLength
public EntityAIMoveToBlock(EntityCreature creature, double speedIn, int length)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
public boolean continueExecuting()
continueExecuting
in class EntityAIBase
public void startExecuting()
startExecuting
in class EntityAIBase
public void resetTask()
resetTask
in class EntityAIBase
public void updateTask()
updateTask
in class EntityAIBase
protected boolean getIsAboveDestination()
private boolean searchForDestination()
EntityAIMoveToBlock#shouldMoveTo(World,
BlockPos)
) can be found.