Class CrossbowAttackTask<E extends MobEntity & CrossbowUser,T extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.CrossbowAttackTask<E,T>
public class CrossbowAttackTask<E extends MobEntity & CrossbowUser,T extends LivingEntity> extends Task<E>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CrossbowAttackTask.CrossbowState
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private int
chargingCooldown
private CrossbowAttackTask.CrossbowState
state
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description CrossbowAttackTask()
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, isTimeLimitExceeded, run, stop, tick, toString, tryStarting
-
Field Details
-
chargingCooldown
private int chargingCooldown -
state
-
-
Constructor Details
-
CrossbowAttackTask
public CrossbowAttackTask()
-
-
Method Details
-
shouldRun
- Overrides:
shouldRun
in classTask<E extends MobEntity & CrossbowUser>
-
shouldKeepRunning
- Overrides:
shouldKeepRunning
in classTask<E extends MobEntity & CrossbowUser>
-
keepRunning
- Overrides:
keepRunning
in classTask<E extends MobEntity & CrossbowUser>
-
finishRunning
- Overrides:
finishRunning
in classTask<E extends MobEntity & CrossbowUser>
-
tickState
-
setLookTarget
-
getAttackTarget
-