Interface AttackLivingGoal
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAttackLivingGoal.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AttackLivingGoal.Builderbuilder()Creates a newAttackLivingGoal.Builderto build a newAttackLivingGoal.booleanhasLongMemory()AttackLivingGoalsetLongMemory(boolean longMemory)AttackLivingGoalsetSpeed(double speed)doublespeed()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.Builderto 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" anEntityafter certain circumstances have been met, sometimes whether a targetedEntityhas 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 parentAgentto continue targeting anEntityafter 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
-
-