public class MeleeAttackGoal extends Goal
| Modifier and Type | Field and Description |
|---|---|
protected CreatureEntity |
attacker |
protected int |
attackInterval |
protected int |
attackTick |
| Constructor and Description |
|---|
MeleeAttackGoal(CreatureEntity creature,
double speedIn,
boolean useLongMemory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndPerformAttack(LivingEntity enemy,
double distToEnemySqr) |
protected double |
getAttackReachSqr(LivingEntity attackTarget) |
void |
resetTask() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
tick() |
getMutexFlags, isPreemptible, setMutexFlagsprotected final CreatureEntity attacker
protected int attackTick
protected final int attackInterval
public MeleeAttackGoal(CreatureEntity creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute in class Goalpublic boolean shouldContinueExecuting()
shouldContinueExecuting in class Goalpublic void startExecuting()
startExecuting in class Goalprotected void checkAndPerformAttack(LivingEntity enemy, double distToEnemySqr)
protected double getAttackReachSqr(LivingEntity attackTarget)