Interface GoalExecutor<O extends Agent>
- Type Parameters:
O
- The type of agent
public interface GoalExecutor<O extends Agent>
Represents a set of goals that will be updated together by an
Agent
.
In Minecraft, most agents "live" by performing goals of their simulation (while sometimes using specialized "targeting" goals for logic).
-
Method Summary
Modifier and TypeMethodDescriptionAdds a newGoal
to this goal.void
clear()
Clears allGoal
s from this goal.owner()
TheAgent
that owns this goal.removeGoal
(Goal<? extends O> goal) Removes a specificGoal
from this goal.removeGoals
(GoalType type) tasks()
Gets allGoal
s in this goal.tasksByType
(GoalType type) type()
The type of this goal.
-
Method Details
-
type
GoalExecutorType type()The type of this goal.- Returns:
- The type
-
owner
O owner()TheAgent
that owns this goal.- Returns:
- The owner
-
addGoal
Adds a newGoal
to this goal.- Parameters:
priority
- The priority this task should run atgoal
- The goal to run- Returns:
- This goal, for chaining
-
removeGoal
Removes a specificGoal
from this goal.- Parameters:
goal
- The goal to remove- Returns:
- This goal, for chaining
-
removeGoals
- Parameters:
type
- The type to remove- Returns:
- The goal, for chaining
-
tasksByType
- Parameters:
type
- The type to look for- Returns:
- All the tasks found
-
tasks
Gets allGoal
s in this goal.- Returns:
- The tasks
-
clear
void clear()Clears allGoal
s from this goal.
-