Class BehaviorGoalAdapter

java.lang.Object
net.citizensnpcs.api.ai.tree.BehaviorGoalAdapter
All Implemented Interfaces:
Goal, Behavior
Direct Known Subclasses:
BlockBreaker, Composite, Decorator, Empty, ForwardingBehaviorGoalAdapter, IfElse, Loop, MoveToGoal, Precondition, StatusMapper, TargetNearbyEntityGoal, TimerDecorator, WanderGoal

public abstract class BehaviorGoalAdapter extends Object implements Goal, Behavior
An adapter between Goal and Behavior, forwarding the calls correctly between them.
  • Constructor Details

    • BehaviorGoalAdapter

      public BehaviorGoalAdapter()
  • Method Details

    • run

      public void run(GoalSelector selector)
      Description copied from interface: Goal
      Updates the goal.
      Specified by:
      run in interface Goal
    • shouldExecute

      public boolean shouldExecute(GoalSelector selector)
      Description copied from interface: Goal
      Returns whether the goal is ready to start.
      Specified by:
      shouldExecute in interface Goal
      Parameters:
      selector - The selector to use during execution
      Returns:
      Whether the goal can be started.
    • create

      public static Goal create(Behavior behavior)