Package net.minecraft.entity.ai.goal
Class BowAttackGoal<T extends HostileEntity & RangedAttackMob>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.BowAttackGoal<T>
public class BowAttackGoal<T extends HostileEntity & RangedAttackMob> extends Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control -
Field Summary
Fields Modifier and Type Field Description private Tactorprivate intattackIntervalprivate booleanbackwardprivate intcombatTicksprivate intcooldownprivate booleanmovingToLeftprivate doublespeedprivate floatsquaredRangeprivate inttargetSeeingTicker -
Constructor Summary
Constructors Constructor Description BowAttackGoal(T actor, double speed, int attackInterval, float range) -
Method Summary
Modifier and Type Method Description booleancanStart()protected booleanisHoldingBow()voidsetAttackInterval(int attackInterval)booleanshouldContinue()voidstart()voidstop()voidtick()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, toString
-
Field Details
-
actor
-
speed
private final double speed -
attackInterval
private int attackInterval -
squaredRange
private final float squaredRange -
cooldown
private int cooldown -
targetSeeingTicker
private int targetSeeingTicker -
movingToLeft
private boolean movingToLeft -
backward
private boolean backward -
combatTicks
private int combatTicks
-
-
Constructor Details
-
BowAttackGoal
-
-
Method Details
-
setAttackInterval
public void setAttackInterval(int attackInterval) -
canStart
public boolean canStart() -
isHoldingBow
protected boolean isHoldingBow() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick()
-