Class TargetGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.target.TargetGoal
- Direct Known Subclasses:
DefendVillageTargetGoal, HurtByTargetGoal, NearestAttackableTargetGoal, OwnerHurtByTargetGoal, OwnerHurtTargetGoal, TraderLlama.TraderLlamaDefendWanderingTraderGoal, Vex.VexCopyOwnerTargetGoal
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprotected final Mobprivate final booleanprotected final booleanprivate intprivate intprotected @Nullable LivingEntityprotected intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionTargetGoal(Mob mob, boolean mustSee) TargetGoal(Mob mob, boolean mustSee, boolean mustReach) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanAttack(@Nullable LivingEntity target, TargetingConditions targetConditions) booleanprivate booleancanReach(LivingEntity target) protected doublesetUnseenMemoryTicks(int unseenMemoryTicks) voidstart()voidstop()Methods inherited from class Goal
adjustedTickDelay, canUse, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
EMPTY_REACH_CACHE
private static final int EMPTY_REACH_CACHE- See Also:
-
CAN_REACH_CACHE
private static final int CAN_REACH_CACHE- See Also:
-
CANT_REACH_CACHE
private static final int CANT_REACH_CACHE- See Also:
-
mob
-
mustSee
protected final boolean mustSee -
mustReach
private final boolean mustReach -
reachCache
private int reachCache -
reachCacheTime
private int reachCacheTime -
unseenTicks
private int unseenTicks -
targetMob
-
unseenMemoryTicks
protected int unseenMemoryTicks
-
-
Constructor Details
-
TargetGoal
-
TargetGoal
-
-
Method Details
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
getFollowDistance
protected double getFollowDistance() -
start
-
stop
-
canAttack
-
canReach
-
setUnseenMemoryTicks
-