Interface IMobAIRegistry
- All Known Implementing Classes:
MobAIRegistry
public interface IMobAIRegistry
-
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the registered AI's to the given mob@NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> Method to get the AI target tasks registered for a given mob.@NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> Method to get the AI tasks registered for a given mob.static IMobAIRegistrydefault @NotNull IMobAIRegistryregisterNewAiTargetTaskForMobs(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.@NotNull IMobAIRegistryregisterNewAiTargetTaskForMobs(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.default @NotNull IMobAIRegistryregisterNewAiTaskForMobs(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.@NotNull IMobAIRegistryregisterNewAiTaskForMobs(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.@NotNull IMobAIRegistryregisterNewStateAI(Function<AbstractEntityMinecoloniesMonster, IStateAI> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate) Method used to register a entity AI task for a mob that matches the predicate.
-
Method Details
-
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
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.
-