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 TypeFieldDescriptionprotected 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_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
-
Field Details
-
targetType
-
randomInterval
protected final int randomInterval -
target
-
targetConditions
-
-
Constructor Details
-
NearestAttackableTargetGoal
-
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
-