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 MobEntity
mob
private boolean
mustReach
protected boolean
mustSee
private int
reachCache
private int
reachCacheTime
protected LivingEntity
targetMob
protected int
unseenMemoryTicks
private int
unseenTicks
-
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 boolean
canAttack(LivingEntity p_220777_1_, EntityPredicate p_220777_2_)
boolean
canContinueToUse()
private boolean
canReach(LivingEntity p_75295_1_)
protected double
getFollowDistance()
TargetGoal
setUnseenMemoryTicks(int p_190882_1_)
void
start()
void
stop()
-
-
-
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:
canContinueToUse
in 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_)
-
-