public interface FindNearestAttackableTargetAITask extends TargetAITask<FindNearestAttackableTargetAITask>
Modifier and Type | Interface and Description |
---|---|
static interface |
FindNearestAttackableTargetAITask.Builder |
Modifier and Type | Method and Description |
---|---|
static FindNearestAttackableTargetAITask.Builder |
builder()
Creates a new
FindNearestAttackableTargetAITask.Builder for building a new FindNearestAttackableTargetAITask . |
FindNearestAttackableTargetAITask |
filter(Predicate<Living> predicate)
|
int |
getChance()
Gets the chance that this task will go through and attempt to find a
new target.
|
Predicate<Living> |
getFilter()
Gets the
Predicate filter to determine whether a living entity
can be targeted. |
Class<? extends Living> |
getTargetClass()
Gets the
entity class that can be targeted. |
FindNearestAttackableTargetAITask |
setChance(int chance)
Sets the chance that this task will go through and attempt to find a
new target.
|
FindNearestAttackableTargetAITask |
setTargetClass(Class<? extends Living> targetClass)
Sets the
entity class that can be targeted. |
onlyNearby, setCheckSight, setOnlyNearby, shouldCheckSight
canBeInterrupted, canRunConcurrentWith, getGoal, getOwner, getType
static FindNearestAttackableTargetAITask.Builder builder()
FindNearestAttackableTargetAITask.Builder
for building a new FindNearestAttackableTargetAITask
.Class<? extends Living> getTargetClass()
entity class
that can be targeted.FindNearestAttackableTargetAITask setTargetClass(Class<? extends Living> targetClass)
entity class
that can be targeted.targetClass
- The entity class to targetint getChance()
FindNearestAttackableTargetAITask setChance(int chance)
chance
- The chance that this task will attemp to find a new targetFindNearestAttackableTargetAITask filter(Predicate<Living> predicate)
predicate
- The predicatePredicate<Living> getFilter()
Predicate
filter to determine whether a living entity
can be targeted.