Interface EntityAI

All Superinterfaces:
Collection<WrappedPathfinder>, Iterable<WrappedPathfinder>, Set<WrappedPathfinder>

public interface EntityAI extends Set<WrappedPathfinder>
Represents Entity Pathfinder AI
  • Method Details

    • getEntity

      @NotNull @NotNull Mob getEntity()
      Fetches the Entity this EntityAI belongs to.
      Returns:
      Entity
    • contains

      boolean contains(@NotNull @NotNull Pathfinder p)
      Whether this EntityAI contains this Pathfinder.
      Parameters:
      p - The Pathfinder to check for.
      Returns:
      true if contains, else false
    • put

      Pathfinder put(@NotNull @NotNull Pathfinder p, int priority)
      Adds a Pathfinder to this Entity AI.
      Parameters:
      p - Pathfinder to add
      priority - Priority of Pathfinder
      Returns:
      Pathfinder added
    • putAll

      void putAll(@NotNull @NotNull Map<? extends Pathfinder,Integer> map)
      Adds all Pathfinders to this Entity AI.
      Parameters:
      map - Map of Pathfinders to their Priorities
    • remove

      boolean remove(@NotNull @NotNull Pathfinder p)
      Removes a Pathfinder from this Entity AI.
      Parameters:
      p - Pathfinder to remove
      Returns:
      Pathfinder removed
    • isRunning

      boolean isRunning(@NotNull @NotNull Pathfinder p)
      Whether this Pathfinder is currently running.
      Parameters:
      p - Pathfinder to use
      Returns:
      true if running, else false
    • getRunningGoals

      Fetches all pathfinders that this Entity is running.
      Returns:
      Set of running Pathfinders
    • disableFlag

      void disableFlag(@Nullable Pathfinder.PathfinderFlag flag)
      Disables all Pathfinders with this flag.
      Parameters:
      flag - Flag to disable
    • enableFlag

      void enableFlag(@Nullable Pathfinder.PathfinderFlag flag)
      Enables all Pathfinders with this flag.
      Parameters:
      flag - Flag to enable