Interface AvoidLivingGoal.Builder

All Superinterfaces:
CopyableBuilder<AvoidLivingGoal,AvoidLivingGoal.Builder>, GoalBuilder<Creature,AvoidLivingGoal,AvoidLivingGoal.Builder>, ResettableBuilder<AvoidLivingGoal,AvoidLivingGoal.Builder>
Enclosing interface:
AvoidLivingGoal

public static interface AvoidLivingGoal.Builder extends GoalBuilder<Creature,AvoidLivingGoal,AvoidLivingGoal.Builder>
  • Method Details

    • targetSelector

      AvoidLivingGoal.Builder targetSelector(Predicate<Living> predicate)
      Sets the Predicate for filtering which Living instances are considered to be "avoided" by the owning Agent.
      Parameters:
      predicate - The predicate
      Returns:
      This builder, for chaining
    • searchDistance

      AvoidLivingGoal.Builder searchDistance(float distance)
      Sets the search distance at which any Living instances in a radius of the parent Agent are considered for avoiding.
      Parameters:
      distance - The search distance
      Returns:
      This builder, for chaining
    • closeRangeSpeed

      AvoidLivingGoal.Builder closeRangeSpeed(double speed)
      Sets the peed "modifier" for which the parent Agent will move away from a found Living to "avoid" when in close range. Close range is currently defined as 7 blocks.
      Parameters:
      speed - The movement speed modifier
      Returns:
      This builder, for chaining
    • farRangeSpeed

      AvoidLivingGoal.Builder farRangeSpeed(double speed)
      Sets the close range speed "modifier" for which the parent Agent will move away from a found Living to "avoid" when in a farther range than 7 blocks.
      Parameters:
      speed - The movement speed modifier
      Returns:
      This builder, for chaining