Class Tasks
java.lang.Object
net.minecraft.entity.ai.brain.task.Tasks
Contains task-related utility methods.
- Mappings:
- Namespace - Name - named - net/minecraft/entity/ai/brain/task/Tasks- intermediary - net/minecraft/class_7897- official - bzx
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E extends LivingEntity>
 SingleTickTask<E> pickRandomly(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks) Returns a task that picks and runs a task fromweightedTasksrandomly.static <E extends LivingEntity>
 SingleTickTask<E> weighted(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks, CompositeTask.Order order, CompositeTask.RunMode runMode) Returns a task that runs task(s) fromweightedTasks.
- 
Constructor Details- 
Taskspublic Tasks()
 
- 
- 
Method Details- 
pickRandomlypublic static <E extends LivingEntity> SingleTickTask<E> pickRandomly(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks) Returns a task that picks and runs a task fromweightedTasksrandomly.- Parameters:
- weightedTasks- the list of pairs of the task function and its weight
- Returns:
- a task that picks and runs a task from weightedTasksrandomly
- Mappings:
- Namespace - Name - Mixin selector - named - pickRandomly- Lnet/minecraft/entity/ai/brain/task/Tasks;pickRandomly(Ljava/util/List;)Lnet/minecraft/entity/ai/brain/task/SingleTickTask;- intermediary - method_47166- Lnet/minecraft/class_7897;method_47166(Ljava/util/List;)Lnet/minecraft/class_7894;- official - a- Lbzx;a(Ljava/util/List;)Lbym;
 
- 
weightedpublic static <E extends LivingEntity> SingleTickTask<E> weighted(List<com.mojang.datafixers.util.Pair<? extends TaskRunnable<? super E>, Integer>> weightedTasks, CompositeTask.Order order, CompositeTask.RunMode runMode) Returns a task that runs task(s) fromweightedTasks.- Parameters:
- weightedTasks- the list of pairs of the task function and its weight
- order- whether to sort or shuffle the task list
- runMode- whether to run all or just one of the tasks
- Returns:
- a task that runs task(s) from weightedTasks
- Mappings:
- Namespace - Name - Mixin selector - named - weighted- Lnet/minecraft/entity/ai/brain/task/Tasks;weighted(Ljava/util/List;Lnet/minecraft/entity/ai/brain/task/CompositeTask$Order;Lnet/minecraft/entity/ai/brain/task/CompositeTask$RunMode;)Lnet/minecraft/entity/ai/brain/task/SingleTickTask;- intermediary - method_47167- Lnet/minecraft/class_7897;method_47167(Ljava/util/List;Lnet/minecraft/class_4103$class_4104;Lnet/minecraft/class_4103$class_4216;)Lnet/minecraft/class_7894;- official - a- Lbzx;a(Ljava/util/List;Lbxp$a;Lbxp$b;)Lbym;
 
 
-