public class FleeEntityGoal<T extends LivingEntity> extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
classToFleeFrom |
protected Predicate<LivingEntity> |
extraInclusionSelector |
private double |
fastSpeed |
protected float |
fleeDistance |
protected EntityNavigation |
fleeingEntityNavigation |
protected Path |
fleePath |
protected Predicate<LivingEntity> |
inclusionSelector |
protected PathAwareEntity |
mob |
private double |
slowSpeed |
protected T |
targetEntity |
private TargetPredicate |
withinRangePredicate |
Constructor and Description |
---|
FleeEntityGoal(PathAwareEntity mob,
Class<T> fleeFromType,
float distance,
double slowSpeed,
double fastSpeed) |
FleeEntityGoal(PathAwareEntity fleeingEntity,
Class<T> classToFleeFrom,
float fleeDistance,
double fleeSlowSpeed,
double fleeFastSpeed,
Predicate<LivingEntity> inclusionSelector) |
FleeEntityGoal(PathAwareEntity mob,
Class<T> fleeFromType,
Predicate<LivingEntity> extraInclusionSelector,
float distance,
double slowSpeed,
double fastSpeed,
Predicate<LivingEntity> inclusionSelector) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
boolean |
shouldContinue() |
void |
start() |
void |
stop() |
void |
tick() |
canStop, getControls, setControls, toString
protected final PathAwareEntity mob
private final double slowSpeed
private final double fastSpeed
protected T extends LivingEntity targetEntity
protected final float fleeDistance
protected Path fleePath
protected final EntityNavigation fleeingEntityNavigation
protected final Class<T extends LivingEntity> classToFleeFrom
protected final Predicate<LivingEntity> extraInclusionSelector
protected final Predicate<LivingEntity> inclusionSelector
private final TargetPredicate withinRangePredicate
public FleeEntityGoal(PathAwareEntity mob, Class<T> fleeFromType, float distance, double slowSpeed, double fastSpeed)
public FleeEntityGoal(PathAwareEntity mob, Class<T> fleeFromType, Predicate<LivingEntity> extraInclusionSelector, float distance, double slowSpeed, double fastSpeed, Predicate<LivingEntity> inclusionSelector)
public FleeEntityGoal(PathAwareEntity fleeingEntity, Class<T> classToFleeFrom, float fleeDistance, double fleeSlowSpeed, double fleeFastSpeed, Predicate<LivingEntity> inclusionSelector)
public boolean shouldContinue()
shouldContinue
in class Goal