Package net.minecraft.entity.ai.goal
Class AvoidEntityGoal<T extends LivingEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.ai.goal.AvoidEntityGoal<T>
-
- Direct Known Subclasses:
CatEntity.AvoidPlayerGoal
,OcelotEntity.AvoidEntityGoal
,PandaEntity.AvoidGoal
,RabbitEntity.AvoidEntityGoal
,WolfEntity.AvoidEntityGoal
public class AvoidEntityGoal<T extends LivingEntity> extends Goal
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<T>
avoidClass
private EntityPredicate
avoidEntityTargeting
protected java.util.function.Predicate<LivingEntity>
avoidPredicate
protected float
maxDist
protected CreatureEntity
mob
protected Path
path
protected PathNavigator
pathNav
protected java.util.function.Predicate<LivingEntity>
predicateOnAvoidEntity
private double
sprintSpeedModifier
protected T
toAvoid
private double
walkSpeedModifier
-
Constructor Summary
Constructors Constructor Description AvoidEntityGoal(CreatureEntity p_i46404_1_, java.lang.Class<T> p_i46404_2_, float p_i46404_3_, double p_i46404_4_, double p_i46404_6_)
AvoidEntityGoal(CreatureEntity p_i48860_1_, java.lang.Class<T> p_i48860_2_, float p_i48860_3_, double p_i48860_4_, double p_i48860_6_, java.util.function.Predicate<LivingEntity> p_i48860_8_)
AvoidEntityGoal(CreatureEntity p_i48859_1_, java.lang.Class<T> p_i48859_2_, java.util.function.Predicate<LivingEntity> p_i48859_3_, float p_i48859_4_, double p_i48859_5_, double p_i48859_7_, java.util.function.Predicate<LivingEntity> p_i48859_9_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canContinueToUse()
boolean
canUse()
void
start()
void
stop()
void
tick()
-
Methods inherited from class net.minecraft.entity.ai.goal.Goal
getFlags, isInterruptable, setFlags, toString
-
-
-
-
Field Detail
-
mob
protected final CreatureEntity mob
-
walkSpeedModifier
private final double walkSpeedModifier
-
sprintSpeedModifier
private final double sprintSpeedModifier
-
toAvoid
protected T extends LivingEntity toAvoid
-
maxDist
protected final float maxDist
-
path
protected Path path
-
pathNav
protected final PathNavigator pathNav
-
avoidClass
protected final java.lang.Class<T extends LivingEntity> avoidClass
-
avoidPredicate
protected final java.util.function.Predicate<LivingEntity> avoidPredicate
-
predicateOnAvoidEntity
protected final java.util.function.Predicate<LivingEntity> predicateOnAvoidEntity
-
avoidEntityTargeting
private final EntityPredicate avoidEntityTargeting
-
-
Constructor Detail
-
AvoidEntityGoal
public AvoidEntityGoal(CreatureEntity p_i46404_1_, java.lang.Class<T> p_i46404_2_, float p_i46404_3_, double p_i46404_4_, double p_i46404_6_)
-
AvoidEntityGoal
public AvoidEntityGoal(CreatureEntity p_i48859_1_, java.lang.Class<T> p_i48859_2_, java.util.function.Predicate<LivingEntity> p_i48859_3_, float p_i48859_4_, double p_i48859_5_, double p_i48859_7_, java.util.function.Predicate<LivingEntity> p_i48859_9_)
-
AvoidEntityGoal
public AvoidEntityGoal(CreatureEntity p_i48860_1_, java.lang.Class<T> p_i48860_2_, float p_i48860_3_, double p_i48860_4_, double p_i48860_6_, java.util.function.Predicate<LivingEntity> p_i48860_8_)
-
-
Method Detail
-
canContinueToUse
public boolean canContinueToUse()
- Overrides:
canContinueToUse
in classGoal
-
-