public class VillagerWalkTowardsTask extends Task<VillagerEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private int |
completionRange |
private MemoryModuleType<GlobalPos> |
destination |
private int |
maxRange |
private int |
maxRunTime |
private float |
speed |
requiredMemoryStates
Constructor and Description |
---|
VillagerWalkTowardsTask(MemoryModuleType<GlobalPos> destination,
float speed,
int completionRange,
int maxRange,
int maxRunTime) |
Modifier and Type | Method and Description |
---|---|
private boolean |
exceedsMaxRange(VillagerEntity villagerEntity,
GlobalPos globalPos) |
private void |
giveUp(VillagerEntity villager,
long time) |
private boolean |
method_30952(ServerWorld serverWorld,
GlobalPos globalPos) |
private boolean |
reachedDestination(ServerWorld world,
VillagerEntity villager,
GlobalPos pos) |
protected void |
run(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private boolean |
shouldGiveUp(ServerWorld world,
VillagerEntity villager) |
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, shouldRun, stop, tick, toString, tryStarting
private final MemoryModuleType<GlobalPos> destination
private final float speed
private final int completionRange
private final int maxRange
private final int maxRunTime
public VillagerWalkTowardsTask(MemoryModuleType<GlobalPos> destination, float speed, int completionRange, int maxRange, int maxRunTime)
private void giveUp(VillagerEntity villager, long time)
protected void run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
run
in class Task<VillagerEntity>
private boolean shouldGiveUp(ServerWorld world, VillagerEntity villager)
private boolean exceedsMaxRange(VillagerEntity villagerEntity, GlobalPos globalPos)
private boolean method_30952(ServerWorld serverWorld, GlobalPos globalPos)
private boolean reachedDestination(ServerWorld world, VillagerEntity villager, GlobalPos pos)