net.minecraft.entity.ai.brain.task

public class FarmerVillagerTask

extends MultiTickTask<VillagerEntity>

All mapped superinterfaces:

Task

net.minecraft.world.entity.ai.behavior.HarvestFarmland
net.minecraft.class_4217
net.minecraft.entity.ai.brain.task.FarmerVillagerTask

Field summary

Modifier and TypeField
private static final int
HARVEST_DURATION
field_30124
MAX_RUN_TIME
public static final float
SPEED_MODIFIER
field_30123
WALK_SPEED
private BlockPos
aboveFarmlandPos
field_18858
currentTarget
private long
nextOkStartTime
field_18861
nextResponseTime
private int
timeWorkedSoFar
field_19239
ticksRan
private final List<BlockPos>
validFarmlandAroundVillager
field_19351
targetPositions

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
protected boolean
checkExtraStartConditions(ServerLevel level, Villager body)
method_19564(class_3218 arg0, class_1646 arg1)
shouldRun(ServerWorld arg0, VillagerEntity arg1)
private BlockPos
getValidFarmland(ServerLevel level)
method_20641(class_3218 arg0)
chooseRandomTarget(ServerWorld world)
private boolean
validPos(BlockPos blockPos, ServerLevel level)
method_20640(class_2338 arg0, class_3218 arg1)
isSuitableTarget(BlockPos pos, ServerWorld world)
protected void
start(ServerLevel level, Villager body, long timestamp)
method_20392(class_3218 arg0, class_1646 arg1, long arg2)
run(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected void
stop(ServerLevel level, Villager body, long timestamp)
method_19566(class_3218 arg0, class_1646 arg1, long arg2)
finishRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected void
tick(ServerLevel level, Villager body, long timestamp)
method_19565(class_3218 arg0, class_1646 arg1, long arg2)
keepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected boolean
canStillUse(ServerLevel level, Villager body, long timestamp)
method_20394(class_3218 arg0, class_1646 arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, VillagerEntity arg1, long arg2)
protected boolean
checkExtraStartConditions(ServerLevel level, LivingEntity body)
method_18919(class_3218 arg0, class_1309 arg1)
shouldRun(ServerWorld arg0, LivingEntity arg1)
protected boolean
canStillUse(ServerLevel level, LivingEntity body, long timestamp)
method_18927(class_3218 arg0, class_1309 arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
stop(ServerLevel level, LivingEntity body, long timestamp)
method_18926(class_3218 arg0, class_1309 arg1, long arg2)
finishRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
tick(ServerLevel level, LivingEntity body, long timestamp)
method_18924(class_3218 arg0, class_1309 arg1, long arg2)
keepRunning(ServerWorld arg0, LivingEntity arg1, long arg2)
protected void
start(ServerLevel level, LivingEntity body, long timestamp)
method_18920(class_3218 arg0, class_1309 arg1, long arg2)
run(ServerWorld arg0, LivingEntity arg1, long arg2)