public class CrossbowAttackTask<E extends MobEntity & CrossbowUser,T extends LivingEntity> extends Task<E>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CrossbowAttackTask.CrossbowState |
Task.Status
Modifier and Type | Field and Description |
---|---|
private int |
chargingCooldown |
private CrossbowAttackTask.CrossbowState |
state |
requiredMemoryStates
Constructor and Description |
---|
CrossbowAttackTask() |
Modifier and Type | Method and Description |
---|---|
protected void |
finishRunning(ServerWorld serverWorld,
E e,
long long2) |
private static LivingEntity |
getAttackTarget(LivingEntity entity) |
protected void |
keepRunning(ServerWorld serverWorld,
E e,
long long2) |
private void |
setLookTarget(MobEntity entity,
LivingEntity target) |
protected boolean |
shouldKeepRunning(ServerWorld serverWorld,
E e,
long long2) |
protected boolean |
shouldRun(ServerWorld serverWorld,
E e) |
private void |
tickState(E entity,
LivingEntity target) |
getStatus, isTimeLimitExceeded, run, stop, tick, toString, tryStarting
private int chargingCooldown
private CrossbowAttackTask.CrossbowState state
protected boolean shouldRun(ServerWorld serverWorld, E e)
shouldRun
in class Task<E extends MobEntity & CrossbowUser>
protected boolean shouldKeepRunning(ServerWorld serverWorld, E e, long long2)
shouldKeepRunning
in class Task<E extends MobEntity & CrossbowUser>
protected void keepRunning(ServerWorld serverWorld, E e, long long2)
keepRunning
in class Task<E extends MobEntity & CrossbowUser>
protected void finishRunning(ServerWorld serverWorld, E e, long long2)
finishRunning
in class Task<E extends MobEntity & CrossbowUser>
private void tickState(E entity, LivingEntity target)
private void setLookTarget(MobEntity entity, LivingEntity target)
private static LivingEntity getAttackTarget(LivingEntity entity)