Package net.minecraft.entity.ai.goal
Class ToggleableNearestAttackableTargetGoal<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>
-
- net.minecraft.entity.ai.goal.ToggleableNearestAttackableTargetGoal<T>
-
public class ToggleableNearestAttackableTargetGoal<T extends LivingEntity> extends NearestAttackableTargetGoal<T>
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canAttack
-
Fields inherited from class net.minecraft.entity.ai.goal.NearestAttackableTargetGoal
randomInterval, target, targetConditions, targetType
-
Fields inherited from class net.minecraft.entity.ai.goal.TargetGoal
mob, mustSee, targetMob, unseenMemoryTicks
-
-
Constructor Summary
Constructors Constructor Description ToggleableNearestAttackableTargetGoal(AbstractRaiderEntity p_i50312_1_, java.lang.Class<T> p_i50312_2_, int p_i50312_3_, boolean p_i50312_4_, boolean p_i50312_5_, java.util.function.Predicate<LivingEntity> p_i50312_6_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canUse()
void
setCanAttack(boolean p_220783_1_)
-
Methods inherited from class net.minecraft.entity.ai.goal.NearestAttackableTargetGoal
findTarget, getTargetSearchArea, setTarget, start
-
Methods inherited from class net.minecraft.entity.ai.goal.TargetGoal
canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stop
-
-
-
-
Constructor Detail
-
ToggleableNearestAttackableTargetGoal
public ToggleableNearestAttackableTargetGoal(AbstractRaiderEntity p_i50312_1_, java.lang.Class<T> p_i50312_2_, int p_i50312_3_, boolean p_i50312_4_, boolean p_i50312_5_, @Nullable java.util.function.Predicate<LivingEntity> p_i50312_6_)
-
-
Method Detail
-
setCanAttack
public void setCanAttack(boolean p_220783_1_)
-
canUse
public boolean canUse()
- Overrides:
canUse
in classNearestAttackableTargetGoal<T extends LivingEntity>
-
-