public class AvoidEntityGoal<T extends LivingEntity> extends Goal
Modifier and Type | Field and Description |
---|---|
protected float |
avoidDistance |
protected T |
avoidTarget |
protected java.util.function.Predicate<LivingEntity> |
avoidTargetSelector |
private EntityPredicate |
builtTargetSelector |
protected java.lang.Class<T> |
classToAvoid |
protected CreatureEntity |
entity |
private double |
farSpeed |
protected java.util.function.Predicate<LivingEntity> |
field_203784_k |
protected PathNavigator |
navigation |
private double |
nearSpeed |
protected Path |
path |
Constructor and Description |
---|
AvoidEntityGoal(CreatureEntity entityIn,
java.lang.Class<T> classToAvoidIn,
float avoidDistanceIn,
double farSpeedIn,
double nearSpeedIn) |
AvoidEntityGoal(CreatureEntity entityIn,
java.lang.Class<T> avoidClass,
float distance,
double nearSpeedIn,
double farSpeedIn,
java.util.function.Predicate<LivingEntity> targetPredicate) |
AvoidEntityGoal(CreatureEntity entityIn,
java.lang.Class<T> avoidClass,
java.util.function.Predicate<LivingEntity> targetPredicate,
float distance,
double nearSpeedIn,
double farSpeedIn,
java.util.function.Predicate<LivingEntity> p_i48859_9_) |
Modifier and Type | Method and Description |
---|---|
void |
resetTask() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
tick() |
getMutexFlags, isPreemptible, setMutexFlags, toString
protected final CreatureEntity entity
private final double farSpeed
private final double nearSpeed
protected T extends LivingEntity avoidTarget
protected final float avoidDistance
protected Path path
protected final PathNavigator navigation
protected final java.lang.Class<T extends LivingEntity> classToAvoid
protected final java.util.function.Predicate<LivingEntity> avoidTargetSelector
protected final java.util.function.Predicate<LivingEntity> field_203784_k
private final EntityPredicate builtTargetSelector
public AvoidEntityGoal(CreatureEntity entityIn, java.lang.Class<T> classToAvoidIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn)
public AvoidEntityGoal(CreatureEntity entityIn, java.lang.Class<T> avoidClass, java.util.function.Predicate<LivingEntity> targetPredicate, float distance, double nearSpeedIn, double farSpeedIn, java.util.function.Predicate<LivingEntity> p_i48859_9_)
public AvoidEntityGoal(CreatureEntity entityIn, java.lang.Class<T> avoidClass, float distance, double nearSpeedIn, double farSpeedIn, java.util.function.Predicate<LivingEntity> targetPredicate)
public boolean shouldExecute()
shouldExecute
in class Goal
public boolean shouldContinueExecuting()
shouldContinueExecuting
in class Goal
public void startExecuting()
startExecuting
in class Goal