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(java.lang.Class<? extends Living> watchedClass)
Sets theClass
of theLiving
type to "stare" or "watch" when that type of entity is nearby.java.lang.Class<? extends Living>
watchedClass()
Gets theClass
of theLiving
type to "stare" or "watch" when that type of entity is nearby.-
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
-
watchedClass
java.lang.Class<? extends Living> watchedClass()
Gets theClass
of theLiving
type to "stare" or "watch" when that type of entity is nearby.- Returns:
- The class of entity to "watch"
-
setWatchedClass
LookAtGoal setWatchedClass(java.lang.Class<? extends Living> watchedClass)
Sets theClass
of theLiving
type to "stare" or "watch" when that type of entity is nearby.- 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
-
-