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()
- componentCount()
- getComponent(int)
Class ActionTimeout
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.ActionWithDelay
com.hypixel.hytale.server.npc.corecomponents.utility.ActionTimeout
- All Implemented Interfaces:
Action, RoleStateChange, IAnnotatedComponent, IAnnotatedComponentCollection, IComponentExecutionControl
-
Field Summary
Fields inherited from interface Action
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionActionTimeout(BuilderActionTimeout builderActionTimeout, BuilderSupport builderSupport) -
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 annotatedvoidloaded(ExecutionSupport executionSupport) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(ExecutionSupport executionSupport) voidremoved(ExecutionSupport executionSupport) voidspawned(ExecutionSupport executionSupport) voidteleported(ExecutionSupport executionSupport, World from, World to) voidunloaded(ExecutionSupport executionSupport) Methods inherited from class ActionWithDelay
isBusy, processDelayMethods inherited from class ActionBase
activate, deactivate, isActivated, isTriggered, setOnceMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContext
-
Constructor Details
-
ActionTimeout
public ActionTimeout(@Nonnull BuilderActionTimeout builderActionTimeout, @Nonnull BuilderSupport builderSupport)
-
-
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
-
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
-