Package net.minecraft.entity.ai.goal
Class CrossbowAttackGoal<T extends HostileEntity & RangedAttackMob & CrossbowUser>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.CrossbowAttackGoal<T>
public class CrossbowAttackGoal<T extends HostileEntity & RangedAttackMob & CrossbowUser> extends Goal
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CrossbowAttackGoal.Stage
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
chargedTicksLeft
static IntRange
field_25696
private int
field_25697
private int
seeingTargetTicker
private double
speed
private float
squaredRange
private CrossbowAttackGoal.Stage
stage
-
Constructor Summary
Constructors Constructor Description CrossbowAttackGoal(T actor, double speed, float range)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
private boolean
hasAliveTarget()
private boolean
isEntityHoldingCrossbow()
private boolean
isUncharged()
boolean
shouldContinue()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, start, toString
-
Field Details
-
field_25696
-
actor
-
stage
-
speed
private final double speed -
squaredRange
private final float squaredRange -
seeingTargetTicker
private int seeingTargetTicker -
chargedTicksLeft
private int chargedTicksLeft -
field_25697
private int field_25697
-
-
Constructor Details
-
CrossbowAttackGoal
-
-
Method Details
-
canStart
public boolean canStart() -
isEntityHoldingCrossbow
private boolean isEntityHoldingCrossbow() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
-
hasAliveTarget
private boolean hasAliveTarget() -
stop
public void stop() -
tick
public void tick() -
isUncharged
private boolean isUncharged()
-