Class NearestAttackableTargetGoal<T extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.target.TargetGoal
net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal<T>
- Direct Known Subclasses:
Bee.BeeBecomeAngryTargetGoal
,EnderMan.EndermanLookForPlayerGoal
,Fox.DefendTrustedTargetGoal
,Llama.LlamaAttackWolfGoal
,NearestAttackableWitchTargetGoal
,NearestHealableRaiderTargetGoal
,NonTameRandomTargetGoal
,PolarBear.PolarBearAttackPlayersGoal
,Shulker.ShulkerDefenseAttackGoal
,Shulker.ShulkerNearestAttackGoal
,Spider.SpiderTargetGoal
,Vindicator.VindicatorJohnnyAttackGoal
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
protected final int
protected LivingEntity
protected TargetingConditions
Fields inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal
mob, mustSee, targetMob, unseenMemoryTicks
-
Constructor Summary
ConstructorDescriptionNearestAttackableTargetGoal
(Mob p_26060_, Class<T> p_26061_, boolean p_26062_) NearestAttackableTargetGoal
(Mob p_26064_, Class<T> p_26065_, boolean p_26066_, boolean p_26067_) NearestAttackableTargetGoal
(Mob p_199891_, Class<T> p_199892_, boolean p_199893_, Predicate<LivingEntity> p_199894_) NearestAttackableTargetGoal
(Mob p_26053_, Class<T> p_26054_, int p_26055_, boolean p_26056_, boolean p_26057_, Predicate<LivingEntity> p_26058_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUse()
protected void
protected AABB
getTargetSearchArea
(double p_26069_) void
setTarget
(LivingEntity p_26071_) void
start()
Methods inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal
canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stop
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
DEFAULT_RANDOM_INTERVAL
private static final int DEFAULT_RANDOM_INTERVAL- See Also:
-
targetType
-
randomInterval
protected final int randomInterval -
target
-
targetConditions
-
-
Constructor Details
-
NearestAttackableTargetGoal
-
NearestAttackableTargetGoal
public NearestAttackableTargetGoal(Mob p_199891_, Class<T> p_199892_, boolean p_199893_, Predicate<LivingEntity> p_199894_) -
NearestAttackableTargetGoal
-
NearestAttackableTargetGoal
public NearestAttackableTargetGoal(Mob p_26053_, Class<T> p_26054_, int p_26055_, boolean p_26056_, boolean p_26057_, @Nullable Predicate<LivingEntity> p_26058_)
-
-
Method Details
-
canUse
public boolean canUse() -
getTargetSearchArea
-
findTarget
protected void findTarget() -
start
public void start()- Overrides:
start
in classTargetGoal
-
setTarget
-