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 TypeFieldDescriptionprivate final float(package private) static final intprivate static final double(package private) static final int(package private) static final int(package private) static final intprivate final Tprivate final doubleprivate final doubleprivate @Nullable SpearUseGoal.SpearUseStateprivate final float -
Constructor Summary
ConstructorsConstructorDescriptionSpearUseGoal(T mob, double speedModifierWhenCharging, double speedModifierWhenRepositioning, float approachDistance, float targetInRangeRadius) -
Method Summary
Methods inherited from class 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
private static final double MAX_FLEEING_TIME -
mob
-
state
-
speedModifierWhenCharging
private final double speedModifierWhenCharging -
speedModifierWhenRepositioning
private final double speedModifierWhenRepositioning -
approachDistanceSq
private final float approachDistanceSq -
targetInRangeRadiusSq
private final float targetInRangeRadiusSq
-
-
Constructor Details
-
SpearUseGoal
public SpearUseGoal(T mob, double speedModifierWhenCharging, double speedModifierWhenRepositioning, float approachDistance, float targetInRangeRadius)
-
-
Method Details
-
canUse
-
ableToAttack
private boolean ableToAttack() -
getKineticWeaponUseDuration
private int getKineticWeaponUseDuration() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
-
stop
-
tick
-