Interface Goal

All Known Subinterfaces:
PrioritisableGoal
All Known Implementing Classes:
AbstractBlockBreaker, BehaviorGoalAdapter, BlockBreaker, Callback, Composite, Decorator, Empty, FollowPathGoal, ForwardingBehaviorGoalAdapter, IfElse, Loop, MoveToGoal, Precondition, Selector, Sequence, StatusMapper, TargetNearbyEntityGoal, TimerDecorator, WanderGoal

public interface Goal
Represents a Goal that can be added to a GoalController. A Goal represents an abstract node in a tree of events. It can be anything from attacking players to a villager. By using the GoalSelector provided in shouldExecute(GoalSelector) the Goal can traverse its tree of behaviours.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Resets the goal and any resources or state it is holding.
    void
    run(GoalSelector selector)
    Updates the goal.
    boolean
    Returns whether the goal is ready to start.
  • Method Details

    • reset

      void reset()
      Resets the goal and any resources or state it is holding.
    • run

      void run(GoalSelector selector)
      Updates the goal.
    • shouldExecute

      boolean shouldExecute(GoalSelector selector)
      Returns whether the goal is ready to start.
      Parameters:
      selector - The selector to use during execution
      Returns:
      Whether the goal can be started.