Interface EntityAI

All Known Implementing Classes:
EntityCreature

public interface EntityAI
Represents an entity which can contain goal selectors and target selectors.

Both types of selectors are being stored in AI groups. For every group there could be only a single goal selector running at a time, but multiple groups are independent of each other, so each of them can have own goal selector running.

  • Method Details

    • getAIGroups

      Collection<EntityAIGroup> getAIGroups()
      Gets the AI groups of this entity.
      Returns:
      a modifiable collection of AI groups of this entity.
    • addAIGroup

      default void addAIGroup(EntityAIGroup group)
      Adds new AI group to this entity.
      Parameters:
      group - a group to be added.
    • addAIGroup

      default void addAIGroup(List<GoalSelector> goalSelectors, List<TargetSelector> targetSelectors)
      Adds new AI group to this entity, consisting of the given goal selectors and target selectors. Their order is also a priority: the lower element index is, the higher priority is.
      Parameters:
      goalSelectors - goal selectors of the group.
      targetSelectors - target selectors of the group.
    • aiTick

      default void aiTick(long time)