Task.Status
Modifier and Type | Field and Description |
---|---|
private Predicate<E> |
startCondition |
private Function<E,Optional<? extends LivingEntity>> |
targetGetter |
requiredMemoryStates
Constructor and Description |
---|
UpdateAttackTargetTask(Function<E,Optional<? extends LivingEntity>> targetGetter) |
UpdateAttackTargetTask(Predicate<E> startCondition,
Function<E,Optional<? extends LivingEntity>> targetGetter) |
Modifier and Type | Method and Description |
---|---|
protected void |
run(ServerWorld serverWorld,
E e,
long long2) |
protected boolean |
shouldRun(ServerWorld serverWorld,
E e) |
private void |
updateAttackTarget(E entity,
LivingEntity target) |
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
private final Function<E extends MobEntity,Optional<? extends LivingEntity>> targetGetter
public UpdateAttackTargetTask(Predicate<E> startCondition, Function<E,Optional<? extends LivingEntity>> targetGetter)
public UpdateAttackTargetTask(Function<E,Optional<? extends LivingEntity>> targetGetter)
protected boolean shouldRun(ServerWorld serverWorld, E e)
protected void run(ServerWorld serverWorld, E e, long long2)
private void updateAttackTarget(E entity, LivingEntity target)