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 T
actor
private int
attackInterval
private boolean
backward
private int
combatTicks
private int
cooldown
private boolean
movingToLeft
private double
speed
private float
squaredRange
private int
targetSeeingTicker
-
Constructor Summary
Constructors Constructor Description BowAttackGoal(T actor, double speed, int attackInterval, float range)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
protected boolean
isHoldingBow()
void
setAttackInterval(int attackInterval)
boolean
shouldContinue()
void
start()
void
stop()
void
tick()
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:
shouldContinue
in classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick()
-