Interface FindNearestAttackableTargetGoal
- 
- All Superinterfaces:
- Goal<Creature>,- TargetGoal<FindNearestAttackableTargetGoal>
 
 public interface FindNearestAttackableTargetGoal extends TargetGoal<FindNearestAttackableTargetGoal> 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceFindNearestAttackableTargetGoal.Builder
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static FindNearestAttackableTargetGoal.Builderbuilder()Creates a newFindNearestAttackableTargetGoal.Builderfor building a newFindNearestAttackableTargetGoal.intchance()Gets the chance that this task will go through and attempt to find a new target.Predicate<Living>filter()Gets thePredicatefilter to determine whether aliving entitycan be targeted.FindNearestAttackableTargetGoalfilter(Predicate<Living> predicate)FindNearestAttackableTargetGoalsetChance(int chance)Sets the chance that this task will go through and attempt to find a new target.FindNearestAttackableTargetGoalsetTargetClass(Class<? extends Living> targetClass)Sets theentity classthat can be targeted.Class<? extends Living>targetClass()Gets theentity classthat can be targeted.- 
Methods inherited from interface org.spongepowered.api.entity.ai.goal.GoalcanBeInterrupted, canRunConcurrentWith, executor, owner, type
 - 
Methods inherited from interface org.spongepowered.api.entity.ai.goal.builtin.creature.target.TargetGoalsetCheckOnlyNearby, setCheckSight, shouldCheckOnlyNearby, shouldCheckSight
 
- 
 
- 
- 
- 
Method Detail- 
builderstatic FindNearestAttackableTargetGoal.Builder builder() Creates a newFindNearestAttackableTargetGoal.Builderfor building a newFindNearestAttackableTargetGoal.- Returns:
- A new builder
 
 - 
targetClassClass<? extends Living> targetClass() Gets theentity classthat can be targeted.- Returns:
- The entity class that can be targeted
 
 - 
setTargetClassFindNearestAttackableTargetGoal setTargetClass(Class<? extends Living> targetClass) Sets theentity classthat can be targeted.- Parameters:
- targetClass- The entity class to target
- Returns:
- This task, for chaining
 
 - 
chanceint chance() Gets the chance that this task will go through and attempt to find a new target.- Returns:
- The chance that this task will go through and find a target
 
 - 
setChanceFindNearestAttackableTargetGoal setChance(int chance) Sets the chance that this task will go through and attempt to find a new target.- Parameters:
- chance- The chance that this task will attemp to find a new target
- Returns:
- This task, for chaining
 
 - 
filterFindNearestAttackableTargetGoal filter(Predicate<Living> predicate) - Parameters:
- predicate- The predicate
- Returns:
- This task, for chaining
 
 - 
filterPredicate<Living> filter() Gets thePredicatefilter to determine whether aliving entitycan be targeted.- Returns:
- The predicate to filter living entities for targeting
 
 
- 
 
-