Package me.gamercoder215.mobchip.ai
Interface EntityAI
- All Superinterfaces:
Collection<WrappedPathfinder>
,Iterable<WrappedPathfinder>
,Set<WrappedPathfinder>
Represents Entity Pathfinder AI
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this EntityAI contains this Pathfinder.void
Disables all Pathfinders with this flag.void
Enables all Pathfinders with this flag.Fetches the Entity this EntityAI belongs to.Fetches all pathfinders that this Entity is running.boolean
Whether this Pathfinder is currently running.put
(@NotNull Pathfinder p, int priority) Adds a Pathfinder to this Entity AI.void
putAll
(@NotNull Map<? extends Pathfinder, Integer> map) Adds all Pathfinders to this Entity AI.boolean
Removes a Pathfinder from this Entity AI.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
getEntity
Fetches the Entity this EntityAI belongs to.- Returns:
- Entity
-
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
-