public class EntityAIAttackMelee extends EntityAIBase
| Modifier and Type | Field and Description |
|---|---|
protected EntityCreature |
attacker |
protected int |
attackInterval |
protected int |
attackTick |
| Constructor and Description |
|---|
EntityAIAttackMelee(EntityCreature creature,
double speedIn,
boolean useLongMemory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndPerformAttack(EntityLivingBase enemy,
double distToEnemySqr) |
protected double |
getAttackReachSqr(EntityLivingBase attackTarget) |
void |
resetTask() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
tick() |
getMutexBits, isInterruptible, setMutexBitsprotected EntityCreature attacker
protected int attackTick
protected final int attackInterval
public EntityAIAttackMelee(EntityCreature creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute in class EntityAIBasepublic boolean shouldContinueExecuting()
shouldContinueExecuting in class EntityAIBasepublic void startExecuting()
startExecuting in class EntityAIBasepublic void resetTask()
resetTask in class EntityAIBasepublic void tick()
tick in class EntityAIBaseprotected void checkAndPerformAttack(EntityLivingBase enemy, double distToEnemySqr)
protected double getAttackReachSqr(EntityLivingBase attackTarget)