public class EntityAIAvoidEntity<T extends Entity> extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
private float |
avoidDistance |
private com.google.common.base.Predicate<? super T> |
avoidTargetSelector |
private com.google.common.base.Predicate<Entity> |
canBeSeenSelector |
private java.lang.Class<T> |
classToAvoid |
protected T |
closestLivingEntity |
protected EntityCreature |
entity |
private double |
farSpeed |
private PathNavigate |
navigation |
private double |
nearSpeed |
private Path |
path |
Constructor and Description |
---|
EntityAIAvoidEntity(EntityCreature entityIn,
java.lang.Class<T> classToAvoidIn,
float avoidDistanceIn,
double farSpeedIn,
double nearSpeedIn) |
EntityAIAvoidEntity(EntityCreature entityIn,
java.lang.Class<T> classToAvoidIn,
com.google.common.base.Predicate<? super T> avoidTargetSelectorIn,
float avoidDistanceIn,
double farSpeedIn,
double nearSpeedIn) |
Modifier and Type | Method and Description |
---|---|
void |
resetTask() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
updateTask() |
getMutexBits, isInterruptible, setMutexBits
private final com.google.common.base.Predicate<Entity> canBeSeenSelector
protected EntityCreature entity
private final double farSpeed
private final double nearSpeed
private final float avoidDistance
private Path path
private final PathNavigate navigation
public EntityAIAvoidEntity(EntityCreature entityIn, java.lang.Class<T> classToAvoidIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn)
public EntityAIAvoidEntity(EntityCreature entityIn, java.lang.Class<T> classToAvoidIn, com.google.common.base.Predicate<? super T> avoidTargetSelectorIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn)
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