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 me.gamercoder215.mobchip.ai.goal.Pathfinder
Pathfinder.PathfinderFlag
-
Field Summary
Fields inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
entity
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TargetPathfinder
(@NotNull Mob m, boolean see) Constructs a TargetPathfinder with reach set to false.protected
TargetPathfinder
(@NotNull Mob m, boolean see, boolean reach) Constructs a TargetPathfinder. -
Method Summary
Methods inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
getEntity, getFlags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.gamercoder215.mobchip.ai.goal.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
public boolean mustSee()Description copied from interface:Targeting
Whether the entity must see the target. -
setSee
public void setSee(boolean see) Description copied from interface:Targeting
Sets whether the entity must see the target. -
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
-