public class HideInHomeTask extends Task<LivingEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private Optional<BlockPos> |
homePosition |
private int |
maxDistance |
private int |
preferredDistance |
private float |
walkSpeed |
requiredMemoryStates
Constructor and Description |
---|
HideInHomeTask(int maxDistance,
float walkSpeed,
int preferredDistance) |
Modifier and Type | Method and Description |
---|---|
protected void |
run(ServerWorld world,
LivingEntity entity,
long time) |
protected boolean |
shouldRun(ServerWorld world,
LivingEntity entity) |
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
private final float walkSpeed
private final int maxDistance
private final int preferredDistance
public HideInHomeTask(int maxDistance, float walkSpeed, int preferredDistance)
protected boolean shouldRun(ServerWorld world, LivingEntity entity)
shouldRun
in class Task<LivingEntity>
protected void run(ServerWorld world, LivingEntity entity, long time)
run
in class Task<LivingEntity>