public class FollowMobTask extends Task<LivingEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private float |
maxDistanceSquared |
private Predicate<LivingEntity> |
predicate |
requiredMemoryStates
Constructor and Description |
---|
FollowMobTask(EntityType<?> type,
float maxDistance) |
FollowMobTask(float maxDistance) |
FollowMobTask(Predicate<LivingEntity> predicate,
float maxDistance) |
FollowMobTask(SpawnGroup group,
float maxDistance) |
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 Predicate<LivingEntity> predicate
private final float maxDistanceSquared
public FollowMobTask(SpawnGroup group, float maxDistance)
public FollowMobTask(EntityType<?> type, float maxDistance)
public FollowMobTask(float maxDistance)
public FollowMobTask(Predicate<LivingEntity> predicate, float maxDistance)
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>