Contents
Class ActionWithDelay
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.ActionWithDelay
- All Implemented Interfaces:
Action, RoleStateChange, IAnnotatedComponent, IComponentExecutionControl
- Direct Known Subclasses:
ActionDropItem, ActionPickUpItem, ActionTimeout
Created on 28/04/2020
-
Field Summary
Fields inherited from interface Action
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBusy()Whether this action has work in flight that spans ticks (e.g. a deferred/delayed continuation bound to this instance).booleanprocessDelay(float dt) Tick down the internal delay on this core componentMethods inherited from class ActionBase
activate, canExecute, clearOnce, deactivate, execute, 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, setContextMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
ActionWithDelay
-
-
Method Details
-
processDelay
public boolean processDelay(float dt) Description copied from interface:IComponentExecutionControlTick down the internal delay on this core component- Specified by:
processDelayin interfaceIComponentExecutionControl- Overrides:
processDelayin classActionBase- Parameters:
dt- the tick duration- Returns:
- whether this component has finished processing its internal delay
-
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.
-