public class MeleeAttackGoal extends Goal
修飾子とタイプ | フィールドと説明 |
---|---|
protected CreatureEntity |
attacker |
protected int |
attackInterval |
protected int |
attackTick |
コンストラクタと説明 |
---|
MeleeAttackGoal(CreatureEntity creature,
double speedIn,
boolean useLongMemory) |
修飾子とタイプ | メソッドと説明 |
---|---|
protected void |
checkAndPerformAttack(LivingEntity enemy,
double distToEnemySqr) |
protected double |
getAttackReachSqr(LivingEntity attackTarget) |
void |
resetTask()
Reset the task's internal state.
|
boolean |
shouldContinueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
boolean |
shouldExecute()
Returns whether execution should begin.
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
void |
tick()
Keep ticking a continuous task that has already been started
|
getMutexFlags, isPreemptible, setMutexFlags, toString
protected final CreatureEntity attacker
protected int attackTick
protected final int attackInterval
public MeleeAttackGoal(CreatureEntity creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute
クラス内 Goal
public boolean shouldContinueExecuting()
shouldContinueExecuting
クラス内 Goal
public void startExecuting()
startExecuting
クラス内 Goal
public void resetTask()
public void tick()
protected void checkAndPerformAttack(LivingEntity enemy, double distToEnemySqr)
protected double getAttackReachSqr(LivingEntity attackTarget)