public abstract class TrackTargetGoal extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
private int |
canNavigateFlag |
private boolean |
checkCanNavigate |
private int |
checkCanNavigateCooldown |
protected boolean |
checkVisibility |
protected int |
maxTimeWithoutVisibility |
protected MobEntity |
mob |
protected LivingEntity |
target |
private int |
timeWithoutVisibility |
Constructor and Description |
---|
TrackTargetGoal(MobEntity mob,
boolean checkVisibility) |
TrackTargetGoal(MobEntity mob,
boolean checkVisibility,
boolean checkNavigable) |
Modifier and Type | Method and Description |
---|---|
private boolean |
canNavigateToEntity(LivingEntity entity) |
protected boolean |
canTrack(LivingEntity target,
TargetPredicate targetPredicate) |
protected double |
getFollowRange() |
TrackTargetGoal |
setMaxTimeWithoutVisibility(int time) |
boolean |
shouldContinue() |
void |
start() |
void |
stop() |
canStart, canStop, getControls, setControls, tick, toString
protected final MobEntity mob
protected final boolean checkVisibility
private final boolean checkCanNavigate
private int canNavigateFlag
private int checkCanNavigateCooldown
private int timeWithoutVisibility
protected LivingEntity target
protected int maxTimeWithoutVisibility
public TrackTargetGoal(MobEntity mob, boolean checkVisibility)
public TrackTargetGoal(MobEntity mob, boolean checkVisibility, boolean checkNavigable)
public boolean shouldContinue()
shouldContinue
in class Goal
protected double getFollowRange()
protected boolean canTrack(@Nullable LivingEntity target, TargetPredicate targetPredicate)
private boolean canNavigateToEntity(LivingEntity entity)
public TrackTargetGoal setMaxTimeWithoutVisibility(int time)