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 float |
maxDistanceForPlayer
This is the Maximum distance that the AI will look for the Entity
|
protected EntityLiving |
theWatcher |
protected java.lang.Class<? extends Entity> |
watchedClass |
| Constructor and Description |
|---|
EntityAIWatchClosest(EntityLiving entitylivingIn,
java.lang.Class<? extends Entity> watchTargetClass,
float maxDistance) |
EntityAIWatchClosest(EntityLiving entitylivingIn,
java.lang.Class<? extends Entity> watchTargetClass,
float maxDistance,
float chanceIn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
continueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
void |
resetTask()
Resets the task
|
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
void |
updateTask()
Updates the task
|
getMutexBits, isInterruptible, setMutexBitsprotected EntityLiving theWatcher
protected Entity closestEntity
protected float maxDistanceForPlayer
protected java.lang.Class<? extends Entity> watchedClass
public EntityAIWatchClosest(EntityLiving entitylivingIn, java.lang.Class<? extends Entity> watchTargetClass, float maxDistance)
public EntityAIWatchClosest(EntityLiving entitylivingIn, java.lang.Class<? extends Entity> watchTargetClass, float maxDistance, float chanceIn)
public boolean shouldExecute()
shouldExecute in class EntityAIBasepublic boolean continueExecuting()
continueExecuting in class EntityAIBasepublic void startExecuting()
startExecuting in class EntityAIBasepublic void resetTask()
resetTask in class EntityAIBasepublic void updateTask()
updateTask in class EntityAIBase