Interface LookAtGoal
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LookAtGoal.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LookAtGoal.Builder
builder()
Creates a newLookAtGoal.Builder
to build a newLookAtGoal
.float
chance()
float
maxDistance()
Gets the maximum distance to "watch" a targetedLiving
.LookAtGoal
setChance(float chance)
SEts the chance to "watch" a targetedLiving
.LookAtGoal
setMaxDistance(float maxDistance)
Sets the maximum distance to "watch" a targetedLiving
.LookAtGoal
setWatchedClass(Class<? extends Living> watchedClass)
Class<? extends Living>
watchedClass()
-
Methods inherited from interface org.spongepowered.api.entity.ai.goal.Goal
canBeInterrupted, canRunConcurrentWith, executor, owner, type
-
-
-
-
Method Detail
-
builder
static LookAtGoal.Builder builder()
Creates a newLookAtGoal.Builder
to build a newLookAtGoal
.- Returns:
- A new builder
-
setWatchedClass
LookAtGoal setWatchedClass(Class<? extends Living> watchedClass)
- Parameters:
watchedClass
- The class of entity to "watch"- Returns:
- This goal, for chaining
-
maxDistance
float maxDistance()
Gets the maximum distance to "watch" a targetedLiving
.- Returns:
- The distance to watch a targeted entity
-
setMaxDistance
LookAtGoal setMaxDistance(float maxDistance)
Sets the maximum distance to "watch" a targetedLiving
.- Parameters:
maxDistance
- The maximum distance to watch an entity- Returns:
- This goal, for chaining
-
chance
float chance()
- Returns:
- The chance to watch
-
setChance
LookAtGoal setChance(float chance)
SEts the chance to "watch" a targetedLiving
.- Parameters:
chance
- The chance to "watch"- Returns:
- This goal, for chaining
-
-