Class ActionBase
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
- All Implemented Interfaces:
Action,RoleStateChange,IAnnotatedComponent,IComponentExecutionControl
- Direct Known Subclasses:
ActionAddToTargetMemory,ActionAppearance,ActionApplyEntityEffect,ActionAttack,ActionBeacon,ActionCombatAbility,ActionCrouch,ActionDelayDespawn,ActionDespawn,ActionDie,ActionDisplayName,ActionFlockBeacon,ActionFlockJoin,ActionFlockLeave,ActionFlockSetTarget,ActionFlockState,ActionIgnoreForAvoidance,ActionInventory,ActionLockOnInteractionTarget,ActionLog,ActionMakePath,ActionModelAttachment,ActionMount,ActionNothing,ActionNotify,ActionOpenBarterShop,ActionOpenShop,ActionOverrideAltitude,ActionOverrideAttitude,ActionParentState,ActionPlaceBlock,ActionPlayAnimation,ActionPlaySound,ActionRandom,ActionRecomputePath,ActionReleaseTarget,ActionRemove,ActionResetBlockSensors,ActionResetInstructions,ActionResetPath,ActionResetSearchRays,ActionRole,ActionSequence,ActionSetAlarm,ActionSetBlockToPlace,ActionSetFlag,ActionSetInteractable,ActionSetLeashPosition,ActionSetMarkedTarget,ActionSetStat,ActionSpawn,ActionSpawnParticles,ActionStartObjective,ActionState,ActionStorePosition,ActionTest,ActionTimer,ActionToggleStateEvaluator,ActionTriggerSpawnBeacon,ActionTriggerSpawners,ActionWithDelay
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Role role, InfoProvider infoProvider) booleancanExecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) voidvoiddeactivate(Role role, InfoProvider infoProvider) booleanexecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) booleanbooleanbooleanprocessDelay(float dt) voidsetOnce()Methods 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
-
once
protected boolean once -
triggered
protected boolean triggered -
active
protected boolean active
-
-
Constructor Details
-
ActionBase
-
-
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
-
execute
public boolean execute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) -
activate
-
deactivate
- Specified by:
deactivatein interfaceAction
-
isActivated
public boolean isActivated()- Specified by:
isActivatedin interfaceAction
-
isTriggered
public boolean isTriggered()- Specified by:
isTriggeredin interfaceIComponentExecutionControl
-
clearOnce
public void clearOnce()- Specified by:
clearOncein interfaceIComponentExecutionControl
-
setOnce
public void setOnce()- Specified by:
setOncein interfaceIComponentExecutionControl
-
processDelay
public boolean processDelay(float dt) - Specified by:
processDelayin interfaceIComponentExecutionControl
-