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 interface
TargetGoal.Builder<A extends TargetGoal<A>,B extends TargetGoal.Builder<A,B>>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description A
setCheckOnlyNearby(boolean nearby)
A
setCheckSight(boolean checkSight)
boolean
shouldCheckOnlyNearby()
boolean
shouldCheckSight()
-
Methods inherited from interface org.spongepowered.api.entity.ai.goal.Goal
canBeInterrupted, canRunConcurrentWith, executor, owner, type
-
-
-
-
Method Detail
-
shouldCheckSight
boolean shouldCheckSight()
Gets whether the owningAgent
can visibly "see" theEntity
being targeted such that anyBlockType
s that are visibly opaque will prevent the owningAgent
from targeting thatEntity
.- Returns:
- Whether line of sight is required to target an entity
-
setCheckSight
A setCheckSight(boolean checkSight)
Sets whether the owningAgent
can visibly "see" theEntity
being targeted such that anyBlockType
s that are visibly opaque will prevent the owningAgent
from 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
-
-