public class EntityAIWatchClosest extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
private float |
chance |
protected Entity |
closestEntity |
protected EntityLiving |
entity |
private int |
lookTime |
protected float |
maxDistanceForPlayer |
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() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
updateTask() |
getMutexBits, isInterruptible, setMutexBits
protected EntityLiving entity
protected Entity closestEntity
protected float maxDistanceForPlayer
private int lookTime
private final float chance
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