public class EntityAIWatchClosest extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
protected Entity |
closestEntity
The closest entity which is being watched by this one.
|
protected EntityLiving |
entity |
protected float |
maxDistanceForPlayer
This is the Maximum distance that the AI will look for the Entity
|
protected java.lang.Class<? extends Entity> |
watchedClass |
Constructor and Description |
---|
EntityAIWatchClosest(EntityLiving entityIn,
java.lang.Class<? extends Entity> watchTargetClass,
float maxDistance) |
EntityAIWatchClosest(EntityLiving entityIn,
java.lang.Class<? extends Entity> watchTargetClass,
float maxDistance,
float chanceIn) |
Modifier and Type | Method and Description |
---|---|
void |
resetTask()
Reset the task's internal state.
|
boolean |
shouldContinueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
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, setMutexBits
protected EntityLiving entity
protected Entity closestEntity
protected float maxDistanceForPlayer
protected java.lang.Class<? extends Entity> watchedClass
public EntityAIWatchClosest(EntityLiving entityIn, java.lang.Class<? extends Entity> watchTargetClass, float maxDistance)
public EntityAIWatchClosest(EntityLiving entityIn, java.lang.Class<? extends Entity> watchTargetClass, float maxDistance, float chanceIn)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
public boolean shouldContinueExecuting()
shouldContinueExecuting
in class EntityAIBase
public void startExecuting()
startExecuting
in class EntityAIBase
public void resetTask()
resetTask
in class EntityAIBase
public void updateTask()
updateTask
in class EntityAIBase