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
Represents a Pathfinder that involves targeting.
For custom Pathfinders, extend CustomPathfinder.
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
Fields inherited from class Pathfinder
entity -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTargetPathfinder(@NotNull Mob m, boolean see) Constructs a TargetPathfinder with reach set to false.protectedTargetPathfinder(@NotNull Mob m, boolean see, boolean reach) Constructs a TargetPathfinder. -
Method Summary
Methods inherited from class Pathfinder
getEntity, getFlagsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PathfinderInfo
getInternalName, getName
-
Constructor Details
-
TargetPathfinder
Constructs a TargetPathfinder with reach set to false.- Parameters:
m- Mob to usesee- Whether the mob has to see the target
-
TargetPathfinder
Constructs a TargetPathfinder.- Parameters:
m- Mob to usesee- Whether the mob has to see the targetreach- Whether the mob has to reach the target
-
-
Method Details
-
mustSee
-
setSee
-
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
-