Class ActionAttack
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.combat.ActionAttack
- All Implemented Interfaces:
Action,RoleStateChange,IAnnotatedComponent,IComponentExecutionControl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final double[]protected doubleprotected Stringprotected Stringprotected final intprotected final double[]protected booleanprotected final booleanprotected final ActionAttack.BallisticModeprotected booleanprotected StringParameterProviderprotected final doubleprotected final floatprotected final booleanprotected final booleanprotected final intprotected booleanprotected final InteractionTypeprotected final doubleprotected Roleprotected final booleanstatic final ThreadLocal<SingleCollector<BallisticData>> Fields inherited from class com.hypixel.hytale.server.npc.corecomponents.ActionBase
active, once, triggeredFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parentFields inherited from interface com.hypixel.hytale.server.npc.instructions.Action
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionActionAttack(BuilderActionAttack builderActionAttack, BuilderSupport builderSupport) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Role role, InfoProvider infoProvider) booleancanExecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) voiddeactivate(Role role, InfoProvider infoProvider) booleanexecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) protected booleanhasTimeForAiming(double dt) protected doubleprotected doubleMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.ActionBase
clearOnce, isActivated, isTriggered, processDelay, setOnceMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.npc.util.IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface com.hypixel.hytale.server.npc.instructions.RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
THREAD_LOCAL_COLLECTOR
-
id
protected final int id -
attack
-
interactionType
-
chargeFor
protected final float chargeFor -
attackPauseRange
protected final double[] attackPauseRange -
aimingTimeRange
protected final double[] aimingTimeRange -
meleeConeAngle
protected final double meleeConeAngle -
ballisticMode
-
checkLineOfSight
protected final boolean checkLineOfSight -
avoidFriendlyFire
protected final boolean avoidFriendlyFire -
damageFriendlies
protected final boolean damageFriendlies -
skipAiming
protected final boolean skipAiming -
chargeDistance
protected final double chargeDistance -
attackParameterSlot
protected final int attackParameterSlot -
interactionVars
-
attackReady
protected boolean attackReady -
attackInteraction
-
ballisticShort
protected boolean ballisticShort -
cachedAttackProvider
-
initialised
protected boolean initialised -
aimingTimeRemaining
protected double aimingTimeRemaining -
ownerRole
-
-
Constructor Details
-
ActionAttack
public ActionAttack(@Nonnull BuilderActionAttack builderActionAttack, @Nonnull BuilderSupport builderSupport)
-
-
Method Details
-
canExecute
public boolean canExecute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
canExecutein interfaceAction- Overrides:
canExecutein classActionBase
-
execute
public boolean execute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
executein interfaceAction- Overrides:
executein classActionBase
-
activate
- Specified by:
activatein interfaceAction- Overrides:
activatein classActionBase
-
deactivate
- Specified by:
deactivatein interfaceAction- Overrides:
deactivatein classActionBase
-
hasTimeForAiming
protected boolean hasTimeForAiming(double dt) -
newAimingTime
protected double newAimingTime() -
newAttackPause
protected double newAttackPause() -
getInteractionVars
-