Class RangedBowAttackGoal<T extends Mob & RangedAttackMob>
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.RangedBowAttackGoal<T>
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final floatprivate intprivate final Tprivate intprivate final doubleprivate booleanprivate booleanprivate int -
Constructor Summary
ConstructorsModifierConstructorDescription<M extends Monster & RangedAttackMob>RangedBowAttackGoal(M mob, double speedModifier, int attackIntervalMin, float attackRadius) RangedBowAttackGoal(T mob, double speedModifier, int attackIntervalMin, float attackRadius) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanUse()protected booleanbooleanvoidsetMinAttackInterval(int ticks) voidstart()voidstop()voidtick()Methods inherited from class Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, setFlags, toString
-
Field Details
-
mob
-
speedModifier
private final double speedModifier -
attackIntervalMin
private int attackIntervalMin -
attackRadiusSqr
private final float attackRadiusSqr -
attackTime
private int attackTime -
seeTime
private int seeTime -
strafingClockwise
private boolean strafingClockwise -
strafingBackwards
private boolean strafingBackwards -
strafingTime
private int strafingTime
-
-
Constructor Details
-
RangedBowAttackGoal
public <M extends Monster & RangedAttackMob> RangedBowAttackGoal(M mob, double speedModifier, int attackIntervalMin, float attackRadius) -
RangedBowAttackGoal
-
-
Method Details
-
setMinAttackInterval
public void setMinAttackInterval(int ticks) -
canUse
-
isHoldingBow
protected boolean isHoldingBow() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
-
stop
-
requiresUpdateEveryTick
public boolean requiresUpdateEveryTick()- Overrides:
requiresUpdateEveryTickin classGoal
-
tick
-