public class EntityAIAttackMelee extends EntityAIBase
Modifier and Type | Field and Description |
---|---|
protected EntityCreature |
attacker |
protected int |
attackInterval |
protected int |
attackTick
An amount of decrementing ticks that allows the entity to attack once the tick reaches 0.
|
Constructor and Description |
---|
EntityAIAttackMelee(EntityCreature creature,
double speedIn,
boolean useLongMemory) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndPerformAttack(EntityLivingBase p_190102_1_,
double p_190102_2_) |
protected double |
getAttackReachSqr(EntityLivingBase attackTarget) |
void |
resetTask()
Reset the task's internal state.
|
boolean |
shouldContinueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
boolean |
shouldExecute()
Returns whether the EntityAIBase should begin execution.
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
void |
updateTask()
Keep ticking a continuous task that has already been started
|
getMutexBits, isInterruptible, setMutexBits
protected EntityCreature attacker
protected int attackTick
protected final int attackInterval
public EntityAIAttackMelee(EntityCreature creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
public boolean shouldContinueExecuting()
shouldContinueExecuting
in class EntityAIBase
public void startExecuting()
startExecuting
in class EntityAIBase
public void resetTask()
resetTask
in class EntityAIBase
public void updateTask()
updateTask
in class EntityAIBase
protected void checkAndPerformAttack(EntityLivingBase p_190102_1_, double p_190102_2_)
protected double getAttackReachSqr(EntityLivingBase attackTarget)