Interface EntityAI
- All Superinterfaces:
Collection<WrappedPathfinder>, Iterable<WrappedPathfinder>, Set<WrappedPathfinder>
Represents Entity Pathfinder AI
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@NotNull Pathfinder p) Whether this EntityAI contains this Pathfinder.voidDisables all Pathfinders with this flag.voidEnables all Pathfinders with this flag.@NotNull MobFetches the Entity this EntityAI belongs to.@NotNull Set<WrappedPathfinder> Fetches all pathfinders that this Entity is running.booleanisRunning(@NotNull Pathfinder p) Whether this Pathfinder is currently running.put(@NotNull Pathfinder p, int priority) Adds a Pathfinder to this Entity AI.voidputAll(@NotNull Map<? extends Pathfinder, Integer> map) Adds all Pathfinders to this Entity AI.booleanremove(@NotNull Pathfinder p) Removes a Pathfinder from this Entity AI.Methods inherited from interface Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
getEntity
-
contains
Whether this EntityAI contains this Pathfinder.- Parameters:
p- The Pathfinder to check for.- Returns:
- true if contains, else false
-
put
Adds a Pathfinder to this Entity AI.- Parameters:
p- Pathfinder to addpriority- Priority of Pathfinder- Returns:
- Pathfinder added
-
putAll
Adds all Pathfinders to this Entity AI.- Parameters:
map- Map of Pathfinders to their Priorities
-
remove
Removes a Pathfinder from this Entity AI.- Parameters:
p- Pathfinder to remove- Returns:
- Pathfinder removed
-
isRunning
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
Disables all Pathfinders with this flag.- Parameters:
flag- Flag to disable
-
enableFlag
Enables all Pathfinders with this flag.- Parameters:
flag- Flag to enable
-