public class EntityAINearestAttackableTarget<T extends EntityLivingBase> extends EntityAITarget
Modifier and Type | Class and Description |
---|---|
static class |
EntityAINearestAttackableTarget.Sorter |
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<T> |
targetClass |
protected EntityLivingBase |
targetEntity |
protected <any> |
targetEntitySelector |
protected EntityAINearestAttackableTarget.Sorter |
theNearestAttackableTargetSorter
Instance of EntityAINearestAttackableTargetSorter.
|
shouldCheckSight, taskOwner
Constructor and Description |
---|
EntityAINearestAttackableTarget(EntityCreature creature,
java.lang.Class<T> classTarget,
boolean checkSight) |
EntityAINearestAttackableTarget(EntityCreature creature,
java.lang.Class<T> classTarget,
boolean checkSight,
boolean onlyNearby) |
EntityAINearestAttackableTarget(EntityCreature creature,
java.lang.Class<T> classTarget,
int chance,
boolean checkSight,
boolean onlyNearby,
<any> targetSelector) |
Modifier and Type | Method and Description |
---|---|
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
continueExecuting, getTargetDistance, isSuitableTarget, isSuitableTarget, resetTask
getMutexBits, isInterruptible, setMutexBits, updateTask
protected final java.lang.Class<T extends EntityLivingBase> targetClass
protected final EntityAINearestAttackableTarget.Sorter theNearestAttackableTargetSorter
protected <any> targetEntitySelector
protected EntityLivingBase targetEntity
public EntityAINearestAttackableTarget(EntityCreature creature, java.lang.Class<T> classTarget, boolean checkSight)
public EntityAINearestAttackableTarget(EntityCreature creature, java.lang.Class<T> classTarget, boolean checkSight, boolean onlyNearby)
public EntityAINearestAttackableTarget(EntityCreature creature, java.lang.Class<T> classTarget, int chance, boolean checkSight, boolean onlyNearby, <any> targetSelector)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
public void startExecuting()
startExecuting
in class EntityAITarget