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
FieldsModifier and TypeFieldDescriptionprotected intprotected LivingEntityprotected TargetingConditionsFields inherited from class net.minecraft.world.entity.ai.goal.target.TargetGoal
mob, mustSee, targetMob, unseenMemoryTicks -
Constructor Summary
ConstructorsConstructorDescriptionNearestAttackableTargetGoal(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 TypeMethodDescriptionbooleancanUse()protected voidprotected AABBgetTargetSearchArea(double p_26069_)voidsetTarget(LivingEntity p_26071_)voidstart()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:
startin classTargetGoal
-
setTarget
-