Class TargetPathfinder

java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.target.TargetPathfinder
All Implemented Interfaces:
PathfinderInfo, Targeting
Direct Known Subclasses:
PathfinderDefendVillage, PathfinderHurtByTarget, PathfinderNearestAttackableTarget, PathfinderOwnerHurtByTarget, PathfinderOwnerHurtTarget

public abstract class TargetPathfinder extends Pathfinder implements Targeting
Represents a Pathfinder that involves targeting.

For custom Pathfinders, extend CustomPathfinder.

  • Constructor Details

    • TargetPathfinder

      protected TargetPathfinder(@NotNull @NotNull Mob m, boolean see)
      Constructs a TargetPathfinder with reach set to false.
      Parameters:
      m - Mob to use
      see - Whether the mob has to see the target
    • TargetPathfinder

      protected TargetPathfinder(@NotNull @NotNull Mob m, boolean see, boolean reach)
      Constructs a TargetPathfinder.
      Parameters:
      m - Mob to use
      see - Whether the mob has to see the target
      reach - Whether the mob has to reach the target
  • Method Details

    • mustSee

      public boolean mustSee()
      Description copied from interface: Targeting
      Whether the entity must see the target.
      Specified by:
      mustSee in interface Targeting
      Returns:
      true if entity must see, else false
    • setSee

      public void setSee(boolean see)
      Description copied from interface: Targeting
      Sets whether the entity must see the target.
      Specified by:
      setSee in interface Targeting
      Parameters:
      see - true if entity must see, else false
    • mustReach

      public boolean mustReach()
      Whether this entity must reach the target.
      Returns:
      true if entity must reach target, else false
    • setReach

      public void setReach(boolean reach)
      Sets whether this entity must reach the target.
      Parameters:
      reach - true if entity must reach target, else false