Interface AvoidLivingGoal.Builder
- All Superinterfaces:
CopyableBuilder<AvoidLivingGoal,
,AvoidLivingGoal.Builder> GoalBuilder<PathfinderAgent,
,AvoidLivingGoal, AvoidLivingGoal.Builder> ResettableBuilder<AvoidLivingGoal,
AvoidLivingGoal.Builder>
- Enclosing interface:
AvoidLivingGoal
public static interface AvoidLivingGoal.Builder
extends GoalBuilder<PathfinderAgent,AvoidLivingGoal,AvoidLivingGoal.Builder>
-
Method Summary
Modifier and TypeMethodDescriptioncloseRangeSpeed
(double speed) farRangeSpeed
(double speed) searchDistance
(float distance) targetSelector
(Predicate<Living> predicate) Methods inherited from interface org.spongepowered.api.util.CopyableBuilder
from
Methods inherited from interface org.spongepowered.api.entity.ai.goal.GoalBuilder
build
Methods inherited from interface org.spongepowered.api.util.ResettableBuilder
reset
-
Method Details
-
targetSelector
Sets thePredicate
for filtering whichLiving
instances are considered to be "avoided" by the owningAgent
.- Parameters:
predicate
- The predicate- Returns:
- This builder, for chaining
-
searchDistance
Sets the search distance at which anyLiving
instances in a radius of the parentAgent
are considered for avoiding.- Parameters:
distance
- The search distance- Returns:
- This builder, for chaining
-
closeRangeSpeed
Sets the peed "modifier" for which the parentAgent
will move away from a foundLiving
to "avoid" when in close range. Close range is currently defined as7
blocks.- Parameters:
speed
- The movement speed modifier- Returns:
- This builder, for chaining
-
farRangeSpeed
Sets the close range speed "modifier" for which the parentAgent
will move away from a foundLiving
to "avoid" when in a farther range than 7 blocks.- Parameters:
speed
- The movement speed modifier- Returns:
- This builder, for chaining
-