Class ActionRandom
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.utility.ActionRandom
- All Implemented Interfaces:
Action,RoleStateChange,IAnnotatedComponent,IComponentExecutionControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final WeightedAction[]protected final WeightedAction[]protected intprotected WeightedActionprotected doubleFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) booleanexecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) voidvoidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(Role role) voidvoidvoidteleported(Role role, World from, World to) voidMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.ActionBase
activate, clearOnce, deactivate, 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, setContext
-
Field Details
-
actions
-
availableActions
-
availableActionsCount
protected int availableActionsCount -
totalWeight
protected double totalWeight -
current
-
-
Constructor Details
-
ActionRandom
-
-
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, InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
executein interfaceAction- Overrides:
executein classActionBase
-
registerWithSupport
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
loaded
-
spawned
-
unloaded
-
removed
-
teleported
-