public abstract class EntityAIMoveToBlock extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
protected BlockPos |
destinationBlock
Block to move to
|
protected int |
runDelay
Controls task execution delay
|
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() |
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, resetTask, setMutexBits
protected int runDelay
protected BlockPos destinationBlock
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 updateTask()
updateTask
in class EntityAIBase
protected boolean getIsAboveDestination()