Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- canExecute(Ref, ExecutionSupport, InfoProvider, double, Store)
- execute(Ref, ExecutionSupport, InfoProvider, double, Store)
- registerWithSupport(ExecutionSupport)
- motionControllerChanged(Ref, NPCEntity, MotionController, ComponentAccessor)
- loaded(ExecutionSupport)
- spawned(ExecutionSupport)
- unloaded(ExecutionSupport)
- removed(ExecutionSupport)
- teleported(ExecutionSupport, World, World)
- clearOnce()
- setOnce()
- isBusy()
- componentCount()
- getComponent(int)
- setContext(IAnnotatedComponent, int)
Class ActionSequence
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.utility.ActionSequence
- All Implemented Interfaces:
Action, RoleStateChange, IAnnotatedComponent, IAnnotatedComponentCollection, IComponentExecutionControl
- Direct Known Subclasses:
ActionForEach, ActionTransformBase
-
Field Summary
Fields inherited from interface Action
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecute(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, double dt, Store<EntityStore> store) Test if an action can be executedvoidintReturns the number of components aggregatedbooleanexecute(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, double dt, Store<EntityStore> store) Execute actiongetComponent(int index) Returns the annotated component at the given index, or null if the component at said index is not annotatedbooleanisBusy()Whether this action has work in flight that spans ticks (e.g. a deferred/delayed continuation bound to this instance).voidloaded(ExecutionSupport executionSupport) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(ExecutionSupport executionSupport) voidremoved(ExecutionSupport executionSupport) voidsetContext(IAnnotatedComponent parent, int index) voidsetOnce()voidspawned(ExecutionSupport executionSupport) voidteleported(ExecutionSupport executionSupport, World from, World to) voidunloaded(ExecutionSupport executionSupport) Methods inherited from class ActionBase
activate, deactivate, isActivated, isTriggered, processDelayMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent
-
Constructor Details
-
ActionSequence
-
-
Method Details
-
canExecute
public boolean canExecute(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) Description copied from interface:ActionTest if an action can be executed- Specified by:
canExecutein interfaceAction- Overrides:
canExecutein classActionBase- Parameters:
ref- The entity refexecutionSupport- The execution supportsensorInfo- SensorInfo with PositionProvider, PathProvider, etc if requireddt- The interval in seconds for this calculationstore- The component store- Returns:
- true if action can be executed else false to skip execution
-
execute
public boolean execute(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) Description copied from interface:ActionExecute action- Specified by:
executein interfaceAction- Overrides:
executein classActionBase- Parameters:
ref- The entity refexecutionSupport- The execution supportsensorInfo- SensorInfo with PositionProvider, PathProvider, etc if requireddt- The interval in seconds for this calculationstore- The component store- Returns:
- true when executed action has finished else false when execution is not completed yet
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange
-
loaded
- Specified by:
loadedin interfaceRoleStateChange
-
spawned
- Specified by:
spawnedin interfaceRoleStateChange
-
unloaded
- Specified by:
unloadedin interfaceRoleStateChange
-
removed
- Specified by:
removedin interfaceRoleStateChange
-
teleported
- Specified by:
teleportedin interfaceRoleStateChange
-
clearOnce
public void clearOnce()- Specified by:
clearOncein interfaceIComponentExecutionControl- Overrides:
clearOncein classActionBase
-
setOnce
public void setOnce()- Specified by:
setOncein interfaceIComponentExecutionControl- Overrides:
setOncein classActionBase
-
isBusy
public boolean isBusy()Description copied from interface:ActionWhether this action has work in flight that spans ticks (e.g. a deferred/delayed continuation bound to this instance). Used byForEach's per-target instance pool to avoid recycling a slot whose action is still mid-execution. Defaults tofalse. -
componentCount
public int componentCount()Description copied from interface:IAnnotatedComponentCollectionReturns the number of components aggregated- Specified by:
componentCountin interfaceIAnnotatedComponentCollection- Returns:
- the number of components aggregated
-
getComponent
Description copied from interface:IAnnotatedComponentCollectionReturns the annotated component at the given index, or null if the component at said index is not annotated- Specified by:
getComponentin interfaceIAnnotatedComponentCollection- Parameters:
index- the index to fetch- Returns:
- the annotated component, or null if the component at the index is not annotated
-
setContext
- Specified by:
setContextin interfaceIAnnotatedComponent- Overrides:
setContextin classAnnotatedComponentBase
-