Package net.minecraft.entity.ai.goal
Class NearestAttackableTargetGoal<T extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TargetGoal
net.minecraft.entity.ai.goal.NearestAttackableTargetGoal<T>
- Direct Known Subclasses:
BeeEntity.AttackPlayerGoal
,EndermanEntity.FindPlayerGoal
,FoxEntity.RevengeGoal
,LlamaEntity.DefendTargetGoal
,NearestAttackableTargetExpiringGoal
,NonTamedTargetGoal
,PolarBearEntity.AttackPlayerGoal
,ShulkerEntity.AttackNearestGoal
,ShulkerEntity.DefenseAttackGoal
,SpiderEntity.TargetGoal
,ToggleableNearestAttackableTargetGoal
,VindicatorEntity.JohnnyAttackGoal
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected LivingEntity
protected EntityPredicate
Fields inherited from class net.minecraft.entity.ai.goal.TargetGoal
mob, mustSee, targetMob, unseenMemoryTicks
-
Constructor Summary
ConstructorDescriptionNearestAttackableTargetGoal
(MobEntity p_i50313_1_, Class<T> p_i50313_2_, boolean p_i50313_3_) NearestAttackableTargetGoal
(MobEntity p_i50314_1_, Class<T> p_i50314_2_, boolean p_i50314_3_, boolean p_i50314_4_) NearestAttackableTargetGoal
(MobEntity p_i50315_1_, Class<T> p_i50315_2_, int p_i50315_3_, boolean p_i50315_4_, boolean p_i50315_5_, Predicate<LivingEntity> p_i50315_6_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUse()
protected void
protected AxisAlignedBB
getTargetSearchArea
(double p_188511_1_) void
setTarget
(LivingEntity p_234054_1_) void
start()
Methods inherited from class net.minecraft.entity.ai.goal.TargetGoal
canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stop
-
Field Details
-
targetType
-
randomInterval
protected final int randomInterval -
target
-
targetConditions
-
-
Constructor Details
-
NearestAttackableTargetGoal
-
NearestAttackableTargetGoal
-
NearestAttackableTargetGoal
public NearestAttackableTargetGoal(MobEntity p_i50315_1_, Class<T> p_i50315_2_, int p_i50315_3_, boolean p_i50315_4_, boolean p_i50315_5_, @Nullable Predicate<LivingEntity> p_i50315_6_)
-
-
Method Details
-
canUse
public boolean canUse() -
getTargetSearchArea
-
findTarget
protected void findTarget() -
start
public void start()- Overrides:
start
in classTargetGoal
-
setTarget
-