Class GatherItemsVillagerTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.GatherItemsVillagerTask
public class GatherItemsVillagerTask extends Task<VillagerEntity>
- Mappings:
Namespace Name official awzintermediary net/minecraft/class_4126named net/minecraft/entity/ai/brain/task/GatherItemsVillagerTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status -
Field Summary
Fields Modifier and Type Field Description private static intfield_30182private static floatfield_30183private Set<Item>itemsFields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates -
Constructor Summary
Constructors Constructor Description GatherItemsVillagerTask() -
Method Summary
Modifier and Type Method Description protected voidfinishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)private static Set<Item>getGatherableItems(VillagerEntity villagerEntity, VillagerEntity villagerEntity2)private static voidgiveHalfOfStack(VillagerEntity villager, Set<Item> validItems, LivingEntity target)protected voidkeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected voidrun(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected booleanshouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)protected booleanshouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
-
Field Details
-
field_30182
private static final int field_30182- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official aLawz;a:Iintermediary field_30182Lnet/minecraft/class_4126;field_30182:Inamed field_30182Lnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;field_30182:I
-
field_30183
private static final float field_30183- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official cLawz;c:Fintermediary field_30183Lnet/minecraft/class_4126;field_30183:Fnamed field_30183Lnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;field_30183:F
-
items
- Mappings:
Namespace Name Mixin selector official dLawz;d:Ljava/util/Set;intermediary field_18389Lnet/minecraft/class_4126;field_18389:Ljava/util/Set;named itemsLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;items:Ljava/util/Set;
-
-
Constructor Details
-
GatherItemsVillagerTask
public GatherItemsVillagerTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector official aLawz;a(Labj;Lbis;)Zintermediary method_19015Lnet/minecraft/class_4126;method_19015(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;)Znamed shouldRunLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;)Z
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunningin classTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector official aLawz;a(Labj;Lbis;J)Zintermediary method_19016Lnet/minecraft/class_4126;method_19016(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Znamed shouldKeepRunningLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)Z
-
run
- Overrides:
runin classTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector official bLawz;b(Labj;Lbis;J)Vintermediary method_19017Lnet/minecraft/class_4126;method_19017(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vnamed runLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
keepRunning
- Overrides:
keepRunningin classTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector official cLawz;c(Labj;Lbis;J)Vintermediary method_19018Lnet/minecraft/class_4126;method_19018(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vnamed keepRunningLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
finishRunning
- Overrides:
finishRunningin classTask<VillagerEntity>- Mappings:
Namespace Name Mixin selector official dLawz;d(Labj;Lbis;J)Vintermediary method_19019Lnet/minecraft/class_4126;method_19019(Lnet/minecraft/class_3218;Lnet/minecraft/class_1646;J)Vnamed finishRunningLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/VillagerEntity;J)V
-
getGatherableItems
private static Set<Item> getGatherableItems(VillagerEntity villagerEntity, VillagerEntity villagerEntity2)- Mappings:
Namespace Name Mixin selector official aLawz;a(Lbis;Lbis;)Ljava/util/Set;intermediary method_19611Lnet/minecraft/class_4126;method_19611(Lnet/minecraft/class_1646;Lnet/minecraft/class_1646;)Ljava/util/Set;named getGatherableItemsLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;getGatherableItems(Lnet/minecraft/entity/passive/VillagerEntity;Lnet/minecraft/entity/passive/VillagerEntity;)Ljava/util/Set;
-
giveHalfOfStack
private static void giveHalfOfStack(VillagerEntity villager, Set<Item> validItems, LivingEntity target)- Mappings:
Namespace Name Mixin selector official aLawz;a(Lbis;Ljava/util/Set;Lasy;)Vintermediary method_19013Lnet/minecraft/class_4126;method_19013(Lnet/minecraft/class_1646;Ljava/util/Set;Lnet/minecraft/class_1309;)Vnamed giveHalfOfStackLnet/minecraft/entity/ai/brain/task/GatherItemsVillagerTask;giveHalfOfStack(Lnet/minecraft/entity/passive/VillagerEntity;Ljava/util/Set;Lnet/minecraft/entity/LivingEntity;)V
-