Package net.minecraft.entity.ai.goal
Class ProjectileAttackGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.ProjectileAttackGoal
- Direct Known Subclasses:
DrownedEntity.TridentAttackGoal
public class ProjectileAttackGoal 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 int
maxIntervalTicks
private float
maxShootRange
private int
minIntervalTicks
private MobEntity
mob
private double
mobSpeed
private RangedAttackMob
owner
private int
seenTargetTicks
private float
squaredMaxShootRange
private LivingEntity
target
private int
updateCountdownTicks
-
Constructor Summary
Constructors Constructor Description ProjectileAttackGoal(RangedAttackMob mob, double mobSpeed, int intervalTicks, float maxShootRange)
ProjectileAttackGoal(RangedAttackMob mob, double mobSpeed, int minIntervalTicks, int maxIntervalTicks, float maxShootRange)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
boolean
shouldContinue()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, start, toString
-
Field Details
-
mob
-
owner
-
target
-
updateCountdownTicks
private int updateCountdownTicks -
mobSpeed
private final double mobSpeed -
seenTargetTicks
private int seenTargetTicks -
minIntervalTicks
private final int minIntervalTicks -
maxIntervalTicks
private final int maxIntervalTicks -
maxShootRange
private final float maxShootRange -
squaredMaxShootRange
private final float squaredMaxShootRange
-
-
Constructor Details
-
ProjectileAttackGoal
public ProjectileAttackGoal(RangedAttackMob mob, double mobSpeed, int intervalTicks, float maxShootRange) -
ProjectileAttackGoal
public ProjectileAttackGoal(RangedAttackMob mob, double mobSpeed, int minIntervalTicks, int maxIntervalTicks, float maxShootRange)
-
-
Method Details