public abstract class EntityAITarget extends EntityAIBase
| Modifier and Type | Field and Description | 
|---|---|
| private boolean | nearbyOnlyWhen true, only entities that can be reached with minimal effort will be targetted. | 
| protected boolean | shouldCheckSightIf true, EntityAI targets must be able to be seen (cannot be blocked by walls) to be suitable targets. | 
| private int | targetSearchDelayWhen nearbyOnly is true, this throttles target searching to avoid excessive pathfinding. | 
| private int | targetSearchStatusWhen nearbyOnly is true: 0 -> No target, but OK to search; 1 -> Nearby target found; 2 -> Target too far. | 
| private int | targetUnseenTicksIf  @shouldCheckSight is true, the number of ticks before the interuption of this AITastk when the entity does't
 see the target | 
| protected EntityCreature | taskOwnerThe entity that this task belongs to | 
| Constructor and Description | 
|---|
| EntityAITarget(EntityCreature creature,
              boolean checkSight) | 
| EntityAITarget(EntityCreature creature,
              boolean checkSight,
              boolean onlyNearby) | 
| Modifier and Type | Method and Description | 
|---|---|
| private boolean | canEasilyReach(EntityLivingBase p_75295_1_)Checks to see if this entity can find a short path to the given target. | 
| boolean | continueExecuting()Returns whether an in-progress EntityAIBase should continue executing | 
| protected double | getTargetDistance() | 
| protected boolean | isSuitableTarget(EntityLivingBase target,
                boolean includeInvincibles)A method used to see if an entity is a suitable target through a number of checks. | 
| static boolean | isSuitableTarget(EntityLiving attacker,
                EntityLivingBase target,
                boolean includeInvincibles,
                boolean checkSight)A static method used to see if an entity is a suitable target through a number of checks. | 
| void | resetTask()Resets the task | 
| void | startExecuting()Execute a one shot task or start executing a continuous task | 
getMutexBits, isInterruptible, setMutexBits, shouldExecute, updateTaskprotected final EntityCreature taskOwner
protected boolean shouldCheckSight
private boolean nearbyOnly
private int targetSearchStatus
private int targetSearchDelay
private int targetUnseenTicks
public EntityAITarget(EntityCreature creature, boolean checkSight)
public EntityAITarget(EntityCreature creature, boolean checkSight, boolean onlyNearby)
public boolean continueExecuting()
continueExecuting in class EntityAIBaseprotected double getTargetDistance()
public void startExecuting()
startExecuting in class EntityAIBasepublic void resetTask()
resetTask in class EntityAIBasepublic static boolean isSuitableTarget(EntityLiving attacker, EntityLivingBase target, boolean includeInvincibles, boolean checkSight)
protected boolean isSuitableTarget(EntityLivingBase target, boolean includeInvincibles)
private boolean canEasilyReach(EntityLivingBase p_75295_1_)