public class RidingTask<E extends LivingEntity,T extends Entity> extends Task<E>
Task.Status
Modifier and Type | Field and Description |
---|---|
private BiPredicate<E,Entity> |
alternativeRideCondition |
private int |
range |
requiredMemoryStates
Constructor and Description |
---|
RidingTask(int range,
BiPredicate<E,Entity> alternativeRideCondition) |
Modifier and Type | Method and Description |
---|---|
private boolean |
canRideTarget(E entity,
Entity target) |
protected void |
run(ServerWorld world,
E entity,
long time) |
protected boolean |
shouldRun(ServerWorld world,
E entity) |
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
private final int range
private final BiPredicate<E extends LivingEntity,Entity> alternativeRideCondition
public RidingTask(int range, BiPredicate<E,Entity> alternativeRideCondition)
protected boolean shouldRun(ServerWorld world, E entity)
shouldRun
in class Task<E extends LivingEntity>
protected void run(ServerWorld world, E entity, long time)
run
in class Task<E extends LivingEntity>