Class GoalSelector

java.lang.Object
net.minecraft.world.entity.ai.goal.GoalSelector

public class GoalSelector extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • addGoal

      public void addGoal(int priority, Goal goal)
      Add a goal to the GoalSelector with a certain priority. Lower numbers are higher priority.
    • removeAllGoals

      public void removeAllGoals(Predicate<Goal> filter)
    • removeGoal

      public void removeGoal(Goal goal)
      Remove the goal from the GoalSelector. This must be the same object as the goal you are trying to remove, which may not always be accessible.
    • goalContainsAnyFlags

      private static boolean goalContainsAnyFlags(WrappedGoal goal, EnumSet<Goal.Flag> flag)
    • goalCanBeReplacedForAllFlags

      private static boolean goalCanBeReplacedForAllFlags(WrappedGoal goal, Map<Goal.Flag,WrappedGoal> flag)
    • tick

      public void tick()
    • tickRunningGoals

      public void tickRunningGoals(boolean tickAllRunning)
    • getAvailableGoals

      public Set<WrappedGoal> getAvailableGoals()
    • disableControlFlag

      public void disableControlFlag(Goal.Flag flag)
    • enableControlFlag

      public void enableControlFlag(Goal.Flag flag)
    • setControlFlag

      public void setControlFlag(Goal.Flag flag, boolean enabled)