Package net.minecraft.entity.ai.goal
Class TargetGoal
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.ai.goal.TargetGoal
-
- Direct Known Subclasses:
DefendVillageTargetGoal,HurtByTargetGoal,NearestAttackableTargetGoal,OwnerHurtByTargetGoal,OwnerHurtTargetGoal,TraderLlamaEntity.FollowTraderGoal,VexEntity.CopyOwnerTargetGoal
public abstract class TargetGoal extends Goal
-
-
Field Summary
Fields Modifier and Type Field Description protected MobEntitymobprivate booleanmustReachprotected booleanmustSeeprivate intreachCacheprivate intreachCacheTimeprotected LivingEntitytargetMobprotected intunseenMemoryTicksprivate intunseenTicks
-
Constructor Summary
Constructors Constructor Description TargetGoal(MobEntity p_i50308_1_, boolean p_i50308_2_)TargetGoal(MobEntity p_i50309_1_, boolean p_i50309_2_, boolean p_i50309_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanAttack(LivingEntity p_220777_1_, EntityPredicate p_220777_2_)booleancanContinueToUse()private booleancanReach(LivingEntity p_75295_1_)protected doublegetFollowDistance()TargetGoalsetUnseenMemoryTicks(int p_190882_1_)voidstart()voidstop()
-
-
-
Field Detail
-
mob
protected final MobEntity mob
-
mustSee
protected final boolean mustSee
-
mustReach
private final boolean mustReach
-
reachCache
private int reachCache
-
reachCacheTime
private int reachCacheTime
-
unseenTicks
private int unseenTicks
-
targetMob
protected LivingEntity targetMob
-
unseenMemoryTicks
protected int unseenMemoryTicks
-
-
Method Detail
-
canContinueToUse
public boolean canContinueToUse()
- Overrides:
canContinueToUsein classGoal
-
getFollowDistance
protected double getFollowDistance()
-
canAttack
protected boolean canAttack(@Nullable LivingEntity p_220777_1_, EntityPredicate p_220777_2_)
-
canReach
private boolean canReach(LivingEntity p_75295_1_)
-
setUnseenMemoryTicks
public TargetGoal setUnseenMemoryTicks(int p_190882_1_)
-
-