public class FollowTargetGoal<T extends LivingEntity> extends TrackTargetGoal
Goal.Control| Modifier and Type | Field and Description |
|---|---|
protected int |
reciprocalChance |
protected Class<T> |
targetClass |
protected LivingEntity |
targetEntity |
protected TargetPredicate |
targetPredicate |
checkVisibility, maxTimeWithoutVisibility, mob, target| Constructor and Description |
|---|
FollowTargetGoal(MobEntity mob,
Class<T> targetClass,
boolean checkVisibility) |
FollowTargetGoal(MobEntity mob,
Class<T> targetClass,
boolean checkVisibility,
boolean checkCanNavigate) |
FollowTargetGoal(MobEntity mob,
Class<T> targetClass,
int reciprocalChance,
boolean checkVisibility,
boolean checkCanNavigate,
Predicate<LivingEntity> targetPredicate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStart() |
protected void |
findClosestTarget() |
protected Box |
getSearchBox(double distance) |
void |
setTargetEntity(LivingEntity targetEntity) |
void |
start() |
canTrack, getFollowRange, setMaxTimeWithoutVisibility, shouldContinue, stopcanStop, getControls, setControls, tick, toStringprotected final Class<T extends LivingEntity> targetClass
protected final int reciprocalChance
protected LivingEntity targetEntity
protected TargetPredicate targetPredicate
public FollowTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility)
public FollowTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate)
protected Box getSearchBox(double distance)
protected void findClosestTarget()
public void start()
start in class TrackTargetGoalpublic void setTargetEntity(@Nullable LivingEntity targetEntity)