Class SpearUseGoal<T extends Monster>
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.SpearUseGoal<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) float(package private) static final int(package private) static final double(package private) static final int(package private) static final int(package private) static final intprivate final T(package private) double(package private) doubleprivate @Nullable SpearUseGoal.SpearUseState(package private) float -
Constructor Summary
ConstructorsConstructorDescriptionSpearUseGoal(T pMob, double pSpeedModifierWhenCharging, double pSpeedModifierWhenRepositioning, float pAttackRadius, float pTargetInRange) -
Method Summary
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString
-
Field Details
-
MIN_REPOSITION_DISTANCE
static final int MIN_REPOSITION_DISTANCE- See Also:
-
MAX_REPOSITION_DISTANCE
static final int MAX_REPOSITION_DISTANCE- See Also:
-
MIN_COOLDOWN_DISTANCE
static final int MIN_COOLDOWN_DISTANCE- See Also:
-
MAX_COOLDOWN_DISTANCE
static final int MAX_COOLDOWN_DISTANCE- See Also:
-
MAX_FLEEING_TIME
static final double MAX_FLEEING_TIME -
mob
-
state
-
speedModifierWhenCharging
double speedModifierWhenCharging -
speedModifierWhenRepositioning
double speedModifierWhenRepositioning -
approachDistanceSq
float approachDistanceSq -
targetInRangeRadiusSq
float targetInRangeRadiusSq
-
-
Constructor Details
-
SpearUseGoal
public SpearUseGoal(T pMob, double pSpeedModifierWhenCharging, double pSpeedModifierWhenRepositioning, float pAttackRadius, float pTargetInRange)
-
-
Method Details
-
canUse
public boolean canUse() -
ableToAttack
private boolean ableToAttack() -
getKineticWeaponUseDuration
private int getKineticWeaponUseDuration() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick()
-