Interface IMobAIRegistry

All Known Implementing Classes:
MobAIRegistry

public interface IMobAIRegistry
  • Method Details

    • getInstance

      static IMobAIRegistry getInstance()
    • getEntityAiTasksForMobs

      @NotNull @NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> getEntityAiTasksForMobs(AbstractEntityMinecoloniesMonster mob)
      Method to get the AI tasks registered for a given mob. Used by minecolonies to get the AIs that are required for a given mob.
      Parameters:
      mob - The mob that the system is initializing and requests the AI for.
      Returns:
      The map with the entity AI tasks that are needed for the given mob, with their priorities.
    • registerNewAiTaskForMobs

      @NotNull default @NotNull IMobAIRegistry registerNewAiTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster,net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer)
      Method used to register a entity AI task for a mob that matches the predicate.
      Parameters:
      priority - The priority to register this task on.
      aiTaskProducer - The task producer in question to register.
      Returns:
      The registry.
    • registerNewAiTaskForMobs

      @NotNull @NotNull IMobAIRegistry registerNewAiTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster,net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate)
      Method used to register a entity AI task for a mob that matches the predicate.
      Parameters:
      priority - The priority to register this task on.
      aiTaskProducer - The task producer in question to register.
      applyPredicate - The predicate used to indicate if the task should be applied to a given mob.
      Returns:
      The registry.
    • registerNewStateAI

      @NotNull @NotNull IMobAIRegistry registerNewStateAI(Function<AbstractEntityMinecoloniesMonster,IStateAI> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate)
      Method used to register a entity AI task for a mob that matches the predicate.
      Parameters:
      aiTaskProducer - The task producer in question to register.
      applyPredicate - The predicate used to indicate if the task should be applied to a given mob.
      Returns:
      The registry.
    • applyToMob

      @NotNull void applyToMob(AbstractEntityMinecoloniesMonster mob)
      Applies the registered AI's to the given mob
    • getEntityAiTargetTasksForMobs

      @NotNull @NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> getEntityAiTargetTasksForMobs(AbstractEntityMinecoloniesMonster mob)
      Method to get the AI target tasks registered for a given mob. Used by minecolonies to get the AIs that are required for a given mob.
      Parameters:
      mob - The mob that the system is initializing and requests the AI for.
      Returns:
      The map with the entity AI tasks that are needed for the given mob, with their priorities.
    • registerNewAiTargetTaskForMobs

      @NotNull default @NotNull IMobAIRegistry registerNewAiTargetTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster,net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer)
      Method used to register a entity AI target task for a mob that matches the predicate.
      Parameters:
      priority - The priority to register this task on.
      aiTaskProducer - The task producer in question to register.
      Returns:
      The registry.
    • registerNewAiTargetTaskForMobs

      @NotNull @NotNull IMobAIRegistry registerNewAiTargetTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster,net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate)
      Method used to register a entity AI target task for a mob that matches the predicate.
      Parameters:
      priority - The priority to register this task on.
      aiTaskProducer - The task producer in question to register.
      applyPredicate - The predicate used to indicate if the task should be applied to a given mob.
      Returns:
      The registry.