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 BlockPos
currentTarget
private long
nextResponseTime
private List<BlockPos>
targetPositions
private int
ticksRan
Fields 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 BlockPos
chooseRandomTarget(ServerWorld world)
protected void
finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
private boolean
isSuitableTarget(BlockPos pos, ServerWorld world)
protected void
keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
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
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:
shouldRun
in classTask<VillagerEntity>
-
chooseRandomTarget
-
isSuitableTarget
-
run
- Overrides:
run
in classTask<VillagerEntity>
-
finishRunning
- Overrides:
finishRunning
in classTask<VillagerEntity>
-
keepRunning
- Overrides:
keepRunning
in classTask<VillagerEntity>
-
shouldKeepRunning
protected boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)- Overrides:
shouldKeepRunning
in classTask<VillagerEntity>
-