Class StateSupport

java.lang.Object
com.hypixel.hytale.server.npc.role.support.StateSupport
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class StateSupport extends Object implements Component<EntityStore>
  • Field Details

  • Constructor Details

  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, StateSupport> getComponentType()
    • get

      @Nonnull public static StateSupport get(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor)
    • getStateTransitionController

      @Nullable public StateTransitionController getStateTransitionController()
    • getStateHelper

      public StateMappingHelper getStateHelper()
    • postRoleBuilt

      public void postRoleBuilt(@Nonnull BuilderSupport builderSupport)
    • update

      public void update(@Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • pollNeedClearOnce

      public boolean pollNeedClearOnce()
    • inState

      public boolean inState(int state)
    • inSubState

      public boolean inSubState(int subState)
    • inState

      public boolean inState(int state, int subState)
    • inState

      public boolean inState(String state, String subState)
    • getStateName

      @Nonnull public String getStateName()
    • getStateName

      @Nonnull public String getStateName(int state, int subState)
    • getStateIndex

      public int getStateIndex()
    • getSubStateIndex

      public int getSubStateIndex()
    • appendStateName

      public void appendStateName(@Nonnull StringBuilder builder)
    • setState

      public void setState(int state, int subState, boolean clearOnce, boolean skipTransition)
    • setState

      public void setState(@Nonnull Ref<EntityStore> ref, @Nonnull String state, @Nullable String subState, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • setSubState

      public void setSubState(String subState)
    • isClearBodyMotion

      public boolean isClearBodyMotion()
    • setClearBodyMotion

      public void setClearBodyMotion(boolean clearBodyMotion)
    • isClearHeadMotion

      public boolean isClearHeadMotion()
    • setClearHeadMotion

      public void setClearHeadMotion(boolean clearHeadMotion)
    • isComponentInState

      public boolean isComponentInState(int componentIndex, int targetState)
    • setComponentState

      public void setComponentState(int componentIndex, int targetState)
    • resetLocalStateMachines

      public void resetLocalStateMachines()
    • flockSetState

      public void flockSetState(Ref<EntityStore> ref, @Nonnull String state, @Nullable String subState, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • isInBusyState

      public boolean isInBusyState()
    • addContextualInteraction

      public void addContextualInteraction(@Nonnull Ref<EntityStore> playerRef, @Nonnull String context)
    • hasContextualInteraction

      public boolean hasContextualInteraction(@Nonnull Ref<EntityStore> playerReference, @Nonnull String context)
    • addInteraction

      public void addInteraction(@Nonnull Ref<EntityStore> playerReference)
    • consumeInteraction

      public boolean consumeInteraction(@Nonnull Ref<EntityStore> playerReference)
    • setInteractable

      public void setInteractable(@Nonnull Ref<EntityStore> playerReference, boolean interactable)
    • setInteractable

      public void setInteractable(@Nonnull Ref<EntityStore> entityRef, @Nonnull Ref<EntityStore> playerReference, boolean interactable, @Nullable String hint, boolean showPrompt, @Nonnull Store<EntityStore> store)
    • setInteractionIterationTarget

      public void setInteractionIterationTarget(@Nullable Ref<EntityStore> playerReference)
      Sets the interaction iteration target to the given entity reference
      Parameters:
      playerReference - The entity reference of the target entity, or null to clear
    • getInteractionIterationTarget

      @Nullable public Ref<EntityStore> getInteractionIterationTarget()
      Returns:
      the entity reference of the interaction iteration target, or null if none are set
    • willInteractWith

      public boolean willInteractWith(@Nonnull Ref<EntityStore> playerReference)
    • runTransitionActions

      public boolean runTransitionActions(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, double dt, @Nonnull Store<EntityStore> store)
    • isRunningTransitionActions

      public boolean isRunningTransitionActions()
    • activate

      public void activate()
    • clone

      public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.