Class ShootTargetTask<E extends MobEntity & ICrossbowUser,T extends LivingEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<E>
-
- net.minecraft.entity.ai.brain.task.ShootTargetTask<E,T>
-
public class ShootTargetTask<E extends MobEntity & ICrossbowUser,T extends LivingEntity> extends Task<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ShootTargetTask.Status
-
Field Summary
Fields Modifier and Type Field Description private int
attackDelay
private ShootTargetTask.Status
crossbowState
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description ShootTargetTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canStillUse(ServerWorld p_212834_1_, E p_212834_2_, long p_212834_3_)
protected boolean
checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
private void
crossbowAttack(E p_233888_1_, LivingEntity p_233888_2_)
private static LivingEntity
getAttackTarget(LivingEntity p_233887_0_)
private void
lookAtTarget(MobEntity p_233889_1_, LivingEntity p_233889_2_)
protected void
stop(ServerWorld p_212835_1_, E p_212835_2_, long p_212835_3_)
protected void
tick(ServerWorld p_212833_1_, E p_212833_2_, long p_212833_3_)
-
-
-
Field Detail
-
attackDelay
private int attackDelay
-
crossbowState
private ShootTargetTask.Status crossbowState
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<E extends MobEntity & ICrossbowUser>
-
canStillUse
protected boolean canStillUse(ServerWorld p_212834_1_, E p_212834_2_, long p_212834_3_)
- Overrides:
canStillUse
in classTask<E extends MobEntity & ICrossbowUser>
-
tick
protected void tick(ServerWorld p_212833_1_, E p_212833_2_, long p_212833_3_)
- Overrides:
tick
in classTask<E extends MobEntity & ICrossbowUser>
-
stop
protected void stop(ServerWorld p_212835_1_, E p_212835_2_, long p_212835_3_)
- Overrides:
stop
in classTask<E extends MobEntity & ICrossbowUser>
-
crossbowAttack
private void crossbowAttack(E p_233888_1_, LivingEntity p_233888_2_)
-
lookAtTarget
private void lookAtTarget(MobEntity p_233889_1_, LivingEntity p_233889_2_)
-
getAttackTarget
private static LivingEntity getAttackTarget(LivingEntity p_233887_0_)
-
-