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, toStringprotected final CreatureEntity attacker
protected int attackTick
protected final int attackInterval
public MeleeAttackGoal(CreatureEntity creature, double speedIn, boolean useLongMemory)
public boolean shouldExecute()
shouldExecute クラス内 Goalpublic boolean shouldContinueExecuting()
shouldContinueExecuting クラス内 Goalpublic void startExecuting()
startExecuting クラス内 Goalpublic void resetTask()
public void tick()
protected void checkAndPerformAttack(LivingEntity enemy, double distToEnemySqr)
protected double getAttackReachSqr(LivingEntity attackTarget)