O - The type of agentpublic interface Goal<O extends Agent>
Agent.
In Minecraft, most agents have just one goal which is living or
simulating, or whichever term you want to call it. Other agents, such as
Monsters, use a "target" goal which serves to seek out potential
victims and execute a series of attack tasks.
| Modifier and Type | Method and Description |
|---|---|
Goal<O> |
addTask(int priority,
AITask<? extends O> task)
Adds a new
AITask to this goal. |
void |
clear()
Clears all
AITasks from this goal. |
O |
getOwner()
The
Agent that owns this goal. |
List<? super AITask<? extends O>> |
getTasks()
Gets all
AITasks in this goal. |
List<? super AITask<? extends O>> |
getTasksByType(AITaskType type)
Gets all
AITasks whose AITaskType matches
the provided type. |
GoalType |
getType()
The type of this goal.
|
Goal<O> |
removeTask(AITask<? extends O> task)
Removes a specific
AITask from this goal. |
Goal<O> |
removeTasks(AITaskType type)
Removes all
AITasks whose AITaskType matches
the provided type. |
GoalType getType()
Goal<O> addTask(int priority, AITask<? extends O> task)
AITask to this goal.priority - The priority this task should run attask - The task to runGoal<O> removeTask(AITask<? extends O> task)
AITask from this goal.task - The task to removeGoal<O> removeTasks(AITaskType type)
AITasks whose AITaskType matches
the provided type.type - The type to removeList<? super AITask<? extends O>> getTasksByType(AITaskType type)
AITasks whose AITaskType matches
the provided type.type - The type to look forList<? super AITask<? extends O>> getTasks()
AITasks in this goal.void clear()
AITasks from this goal.