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 |
|---|---|
protected boolean |
getIsAboveDestination() |
boolean |
shouldContinueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
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()
Keep ticking a continuous task that has already been started
|
getMutexBits, isInterruptible, resetTask, setMutexBitsprotected int runDelay
protected BlockPos destinationBlock
public EntityAIMoveToBlock(EntityCreature creature, double speedIn, int length)
public boolean shouldExecute()
shouldExecute in class EntityAIBasepublic boolean shouldContinueExecuting()
shouldContinueExecuting in class EntityAIBasepublic void startExecuting()
startExecuting in class EntityAIBasepublic void updateTask()
updateTask in class EntityAIBaseprotected boolean getIsAboveDestination()