Class FarmerVillagerTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<VillagerEntity>
net.minecraft.entity.ai.brain.task.FarmerVillagerTask
public class FarmerVillagerTask 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 BlockPoscurrentTargetprivate longnextResponseTimeprivate List<BlockPos>targetPositionsprivate intticksRanFields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates -
Constructor Summary
Constructors Constructor Description FarmerVillagerTask() -
Method Summary
Modifier and Type Method Description private BlockPoschooseRandomTarget(ServerWorld world)protected voidfinishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)private booleanisSuitableTarget(BlockPos pos, ServerWorld world)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
-
currentTarget
-
nextResponseTime
private long nextResponseTime -
ticksRan
private int ticksRan -
targetPositions
-
-
Constructor Details
-
FarmerVillagerTask
public FarmerVillagerTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classTask<VillagerEntity>
-
chooseRandomTarget
-
isSuitableTarget
-
run
- Overrides:
runin classTask<VillagerEntity>
-
finishRunning
- Overrides:
finishRunningin classTask<VillagerEntity>
-
keepRunning
- Overrides:
keepRunningin classTask<VillagerEntity>
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunningin classTask<VillagerEntity>
-