Interface TargetGoal<A extends TargetGoal<A>>
-
- All Known Subinterfaces:
FindNearestAttackableTargetGoal
public interface TargetGoal<A extends TargetGoal<A>> extends Goal<Creature>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTargetGoal.Builder<A extends TargetGoal<A>,B extends TargetGoal.Builder<A,B>>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsetCheckOnlyNearby(boolean nearby)AsetCheckSight(boolean checkSight)booleanshouldCheckOnlyNearby()booleanshouldCheckSight()-
Methods inherited from interface org.spongepowered.api.entity.ai.goal.Goal
canBeInterrupted, canRunConcurrentWith, executor, owner, type
-
-
-
-
Method Detail
-
shouldCheckSight
boolean shouldCheckSight()
Gets whether the owningAgentcan visibly "see" theEntitybeing targeted such that anyBlockTypes that are visibly opaque will prevent the owningAgentfrom targeting thatEntity.- Returns:
- Whether line of sight is required to target an entity
-
setCheckSight
A setCheckSight(boolean checkSight)
Sets whether the owningAgentcan visibly "see" theEntitybeing targeted such that anyBlockTypes that are visibly opaque will prevent the owningAgentfrom targeting thatEntity.- Parameters:
checkSight- Whether line of sight is required to target- Returns:
- This goal, for chaining
-
shouldCheckOnlyNearby
boolean shouldCheckOnlyNearby()
- Returns:
- Whether only nearby entities can be targeted
-
setCheckOnlyNearby
A setCheckOnlyNearby(boolean nearby)
- Parameters:
nearby- Whether only nearby entities can be targeted- Returns:
- This goal, for chaining
-
-