Class EntityAITarget

java.lang.Object
net.minecraft.src.EntityAIBase
net.minecraft.src.EntityAITarget
Direct Known Subclasses:
EntityAIDefendVillage, EntityAIHurtByTarget, EntityAINearestAttackableTarget, EntityAIOwnerHurtByTarget, EntityAIOwnerHurtTarget

public abstract class EntityAITarget extends EntityAIBase
  • Field Details

    • taskOwner

      protected EntityCreature taskOwner
      The entity that this task belongs to
    • shouldCheckSight

      protected boolean shouldCheckSight
      If true, EntityAI targets must be able to be seen (cannot be blocked by walls) to be suitable targets.
    • ignoreTargetsOutsideHome

      protected boolean ignoreTargetsOutsideHome
  • Constructor Details

    • EntityAITarget

      public EntityAITarget(EntityCreature par1EntityCreature, boolean par2)
    • EntityAITarget

      public EntityAITarget(EntityCreature par1EntityCreature, boolean par2, boolean par3)
  • Method Details

    • continueExecuting

      public boolean continueExecuting()
      Returns whether an in-progress EntityAIBase should continue executing
      Overrides:
      continueExecuting in class EntityAIBase
    • getTargetDistance

      protected double getTargetDistance()
    • startExecuting

      public void startExecuting()
      Execute a one shot task or start executing a continuous task
      Overrides:
      startExecuting in class EntityAIBase
    • resetTask

      public void resetTask()
      Resets the task
      Overrides:
      resetTask in class EntityAIBase
    • isSuitableTarget

      protected boolean isSuitableTarget(EntityLivingBase par1EntityLivingBase, boolean par2)
      A method used to see if an entity is a suitable target through a number of checks.