Class FollowMobTask
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<LivingEntity>
net.minecraft.entity.ai.brain.task.FollowMobTask
public class FollowMobTask extends Task<LivingEntity>
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description private floatmaxDistanceSquaredprivate Predicate<LivingEntity>predicate -
Constructor Summary
Constructors Constructor Description FollowMobTask(float maxDistance)FollowMobTask(Predicate<LivingEntity> predicate, float maxDistance)FollowMobTask(EntityType<?> type, float maxDistance)FollowMobTask(SpawnGroup group, float maxDistance) -
Method Summary
Modifier and Type Method Description protected voidrun(ServerWorld world, LivingEntity entity, long time)protected booleanshouldRun(ServerWorld world, LivingEntity entity)Methods inherited from class net.minecraft.entity.ai.brain.task.Task
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
-
Field Details
-
predicate
-
maxDistanceSquared
private final float maxDistanceSquared
-
-
Constructor Details
-
FollowMobTask
-
FollowMobTask
-
FollowMobTask
public FollowMobTask(float maxDistance) -
FollowMobTask
-
-
Method Details
-
shouldRun
- Overrides:
shouldRunin classTask<LivingEntity>
-
run
- Overrides:
runin classTask<LivingEntity>
-