类 MeleeAttackGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.MeleeAttackGoal
- 直接已知子类:
Bee.BeeAttackGoal
,Fox.FoxMeleeAttackGoal
,Panda.PandaAttackGoal
,PolarBear.PolarBearMeleeAttackGoal
,Spider.SpiderAttackGoal
,ZombieAttackGoal
-
嵌套类概要
-
字段概要
字段修饰符和类型字段说明private final int
private static final long
private final boolean
private long
protected final PathfinderMob
private Path
private double
private double
private double
private final double
private int
private int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
protected boolean
canPerformAttack
(LivingEntity p_301299_) boolean
canUse()
protected void
checkAndPerformAttack
(LivingEntity p_25557_) protected int
protected int
protected boolean
boolean
protected void
void
start()
void
stop()
void
tick()
从类继承的方法 net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, setFlags, toString
-
字段详细资料
-
mob
-
speedModifier
private final double speedModifier -
followingTargetEvenIfNotSeen
private final boolean followingTargetEvenIfNotSeen -
path
-
pathedTargetX
private double pathedTargetX -
pathedTargetY
private double pathedTargetY -
pathedTargetZ
private double pathedTargetZ -
ticksUntilNextPathRecalculation
private int ticksUntilNextPathRecalculation -
ticksUntilNextAttack
private int ticksUntilNextAttack -
attackInterval
private final int attackInterval- 另请参阅:
-
lastCanUseCheck
private long lastCanUseCheck -
COOLDOWN_BETWEEN_CAN_USE_CHECKS
private static final long COOLDOWN_BETWEEN_CAN_USE_CHECKS- 另请参阅:
-
-
构造器详细资料
-
MeleeAttackGoal
-
-
方法详细资料
-
canUse
public boolean canUse() -
canContinueToUse
public boolean canContinueToUse()- 覆盖:
canContinueToUse
在类中Goal
-
start
public void start() -
stop
public void stop() -
requiresUpdateEveryTick
public boolean requiresUpdateEveryTick()- 覆盖:
requiresUpdateEveryTick
在类中Goal
-
tick
public void tick() -
checkAndPerformAttack
-
resetAttackCooldown
protected void resetAttackCooldown() -
isTimeToAttack
protected boolean isTimeToAttack() -
canPerformAttack
-
getTicksUntilNextAttack
protected int getTicksUntilNextAttack() -
getAttackInterval
protected int getAttackInterval()
-