Interface AttackLivingGoal
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AttackLivingGoal.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AttackLivingGoal.Builder
builder()
Creates a newAttackLivingGoal.Builder
to build a newAttackLivingGoal
.boolean
hasLongMemory()
AttackLivingGoal
setLongMemory(boolean longMemory)
AttackLivingGoal
setSpeed(double speed)
double
speed()
Gets the "movement" speed modifier when targeting towards a targetedEntity
.-
Methods inherited from interface org.spongepowered.api.entity.ai.goal.Goal
canBeInterrupted, canRunConcurrentWith, executor, owner, type
-
-
-
-
Method Detail
-
builder
static AttackLivingGoal.Builder builder()
Creates a newAttackLivingGoal.Builder
to build a newAttackLivingGoal
.- Returns:
- A new builder
-
speed
double speed()
Gets the "movement" speed modifier when targeting towards a targetedEntity
.- Returns:
- The movement speed modifier when targeting an entity
-
setSpeed
AttackLivingGoal setSpeed(double speed)
- Parameters:
speed
- The speed- Returns:
- This goal, for chaining
-
hasLongMemory
boolean hasLongMemory()
Gets whether the navigator will attempt to continue to "target" anEntity
after certain circumstances have been met, sometimes whether a targetedEntity
has moved too far away, moved to where there is an obstacle between the parent and the targeted entity, etc.- Returns:
- Whether the task will continue targeting the entity after certain conditions prevent a direct navigation path is not available
-
setLongMemory
AttackLivingGoal setLongMemory(boolean longMemory)
Sets whether the task will continue to navigate the parentAgent
to continue targeting anEntity
after the entity has moved to where a direct navigation path is no longer available.- Parameters:
longMemory
- Whether to continue targeting an entity- Returns:
- This goal, for chaining
-
-