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 long
lastCheckedTime
Fields 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 void
performAdditionalWork(ServerWorld world, VillagerEntity entity)
protected void
run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected boolean
shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
protected boolean
shouldRun(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:
shouldRun
in classTask<VillagerEntity>
-
run
- Overrides:
run
in classTask<VillagerEntity>
-
performAdditionalWork
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunning
in classTask<VillagerEntity>
-