Class VillagerWorkTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.VillagerWorkTask
- Direct Known Subclasses:
FarmerWorkTask
public class VillagerWorkTask extends Task<VillagerEntity>
-
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 longlastCheckedTimeFields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates -
Constructor Summary
Constructors Constructor Description VillagerWorkTask() -
Method Summary
Modifier and Type Method Description protected voidperformAdditionalWork(ServerWorld world, VillagerEntity entity)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
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, stop, tick, toString, tryStarting
-
Field Details
-
lastCheckedTime
private long lastCheckedTime
-
-
Constructor Details
-
VillagerWorkTask
public VillagerWorkTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classTask<VillagerEntity>
-
run
- Overrides:
runin classTask<VillagerEntity>
-
performAdditionalWork
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunningin classTask<VillagerEntity>
-