Package net.minecraft.entity.ai.goal
Class TrackTargetGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
- Direct Known Subclasses:
AttackWithOwnerGoal,FollowTargetGoal,RevengeGoal,TrackIronGolemTargetGoal,TrackOwnerAttackerGoal,TraderLlamaEntity.DefendTraderGoal,VexEntity.TrackOwnerTargetGoal
public abstract class TrackTargetGoal extends Goal
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description private intcanNavigateFlagprivate booleancheckCanNavigateprivate intcheckCanNavigateCooldownprotected booleancheckVisibilityprotected intmaxTimeWithoutVisibilityprotected MobEntitymobprotected LivingEntitytargetprivate inttimeWithoutVisibility -
Constructor Summary
Constructors Constructor Description TrackTargetGoal(MobEntity mob, boolean checkVisibility)TrackTargetGoal(MobEntity mob, boolean checkVisibility, boolean checkNavigable) -
Method Summary
Modifier and Type Method Description private booleancanNavigateToEntity(LivingEntity entity)protected booleancanTrack(LivingEntity target, TargetPredicate targetPredicate)protected doublegetFollowRange()TrackTargetGoalsetMaxTimeWithoutVisibility(int time)booleanshouldContinue()voidstart()voidstop()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStart, canStop, getControls, setControls, tick, toString
-
Field Details
-
mob
-
checkVisibility
protected final boolean checkVisibility -
checkCanNavigate
private final boolean checkCanNavigate -
canNavigateFlag
private int canNavigateFlag -
checkCanNavigateCooldown
private int checkCanNavigateCooldown -
timeWithoutVisibility
private int timeWithoutVisibility -
target
-
maxTimeWithoutVisibility
protected int maxTimeWithoutVisibility
-
-
Constructor Details
-
Method Details
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal
-
getFollowRange
protected double getFollowRange() -
start
public void start() -
stop
public void stop() -
canTrack
-
canNavigateToEntity
-
setMaxTimeWithoutVisibility
-