public class MeleeAttackGoal extends Goal
Modifier and Type | Field and Description |
---|---|
protected CreatureEntity |
attacker |
protected int |
attackInterval |
protected int |
attackTick |
private boolean |
canPenalize |
private int |
delayCounter |
private int |
failedPathFindingPenalty |
private long |
field_220720_k |
private boolean |
longMemory |
private Path |
path |
private double |
speedTowardsTarget |
private double |
targetX |
private double |
targetY |
private double |
targetZ |
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, setMutexFlags, toString
protected final CreatureEntity attacker
protected int attackTick
private final double speedTowardsTarget
private final boolean longMemory
private Path path
private int delayCounter
private double targetX
private double targetY
private double targetZ
protected final int attackInterval
private long field_220720_k
private int failedPathFindingPenalty
private boolean canPenalize
public MeleeAttackGoal(CreatureEntity creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute
in class Goal
public boolean shouldContinueExecuting()
shouldContinueExecuting
in class Goal
public void startExecuting()
startExecuting
in class Goal
protected void checkAndPerformAttack(LivingEntity enemy, double distToEnemySqr)
protected double getAttackReachSqr(LivingEntity attackTarget)