Interface LookAtGoal
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLookAtGoal.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LookAtGoal.Builderbuilder()Creates a newLookAtGoal.Builderto build a newLookAtGoal.floatchance()floatmaxDistance()Gets the maximum distance to "watch" a targetedLiving.LookAtGoalsetChance(float chance)SEts the chance to "watch" a targetedLiving.LookAtGoalsetMaxDistance(float maxDistance)Sets the maximum distance to "watch" a targetedLiving.LookAtGoalsetWatchedClass(java.lang.Class<? extends Living> watchedClass)Sets theClassof theLivingtype to "stare" or "watch" when that type of entity is nearby.java.lang.Class<? extends Living>watchedClass()Gets theClassof theLivingtype 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.Builderto build a newLookAtGoal.- Returns:
- A new builder
-
watchedClass
java.lang.Class<? extends Living> watchedClass()
Gets theClassof theLivingtype 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 theClassof theLivingtype 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
-
-