Class MobAIRegistry
java.lang.Object
com.minecolonies.core.entity.mobs.registry.MobAIRegistry
- All Implemented Interfaces:
IMobAIRegistry
-
Constructor Summary
Constructors -
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.@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.@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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.entity.mobs.registry.IMobAIRegistry
registerNewAiTargetTaskForMobs, registerNewAiTaskForMobs
-
Constructor Details
-
MobAIRegistry
public MobAIRegistry()
-
-
Method Details
-
getEntityAiTasksForMobs
@NotNull public @NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> getEntityAiTasksForMobs(AbstractEntityMinecoloniesMonster mob) Description copied from interface:IMobAIRegistryMethod to get the AI tasks registered for a given mob. Used by minecolonies to get the AIs that are required for a given mob.- Specified by:
getEntityAiTasksForMobsin interfaceIMobAIRegistry- 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 public @NotNull IMobAIRegistry registerNewAiTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster, net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate) Description copied from interface:IMobAIRegistryMethod used to register a entity AI task for a mob that matches the predicate.- Specified by:
registerNewAiTaskForMobsin interfaceIMobAIRegistry- 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 public @NotNull IMobAIRegistry registerNewStateAI(Function<AbstractEntityMinecoloniesMonster, IStateAI> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate) Description copied from interface:IMobAIRegistryMethod used to register a entity AI task for a mob that matches the predicate.- Specified by:
registerNewStateAIin interfaceIMobAIRegistry- 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
Description copied from interface:IMobAIRegistryApplies the registered AI's to the given mob- Specified by:
applyToMobin interfaceIMobAIRegistry
-
getEntityAiTargetTasksForMobs
@NotNull public @NotNull com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.ai.goal.Goal> getEntityAiTargetTasksForMobs(AbstractEntityMinecoloniesMonster mob) Description copied from interface:IMobAIRegistryMethod 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.- Specified by:
getEntityAiTargetTasksForMobsin interfaceIMobAIRegistry- 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 public @NotNull IMobAIRegistry registerNewAiTargetTaskForMobs(int priority, Function<AbstractEntityMinecoloniesMonster, net.minecraft.world.entity.ai.goal.Goal> aiTaskProducer, Predicate<AbstractEntityMinecoloniesMonster> applyPredicate) Description copied from interface:IMobAIRegistryMethod used to register a entity AI target task for a mob that matches the predicate.- Specified by:
registerNewAiTargetTaskForMobsin interfaceIMobAIRegistry- 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.
-