Package net.minestom.server.entity.ai
Class EntityAIGroup
java.lang.Object
net.minestom.server.entity.ai.EntityAIGroup
Represents a group of entity's AI.
It may contains
goal selectors
and target selectors
.
All AI groups of a single entity are independent of each other.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable GoalSelector
Gets the current goal selector of this group.@NotNull List
<GoalSelector> Gets the goal selectors of this group.@NotNull List
<TargetSelector> Gets the target selectors of this group.void
setCurrentGoalSelector
(@Nullable GoalSelector goalSelector) Changes the current goal selector of this group.void
tick
(long time)
-
Constructor Details
-
EntityAIGroup
public EntityAIGroup()
-
-
Method Details
-
getGoalSelectors
Gets the goal selectors of this group.- Returns:
- a modifiable list containing this group goal selectors
-
getTargetSelectors
Gets the target selectors of this group.- Returns:
- a modifiable list containing this group target selectors
-
getCurrentGoalSelector
Gets the current goal selector of this group.- Returns:
- the current goal selector of this group, null if not any
-
setCurrentGoalSelector
Changes the current goal selector of this group.Mostly unsafe since the current goal selector should normally be chosen during the group tick method.
- Parameters:
goalSelector
- the new goal selector of this group, null to disable it
-
tick
public void tick(long time)
-