classpublicPriority 3
StateSupport
com.hypixel.hytale.server.npc.role.support.StateSupport
32
Methods
32
Public Methods
14
Fields
1
Constructors
Constants
intNO_STATE= -2147483648
ComponentType<EntityStore, NPCEntity>NPC_COMPONENT_TYPE= NPCEntity.getComponentType()
Constructors
public
StateSupport(BuilderRole builder, BuilderSupport support)Methods
Public Methods (32)
public
void activate()public
void addContextualInteraction(Ref<EntityStore> playerRef, String context)public
void addInteraction(Player player)public
void appendStateName(StringBuilder builder)public
boolean consumeInteraction(Ref<EntityStore> playerReference)public
void flockSetState(Ref<EntityStore> ref, String state, String subState, ComponentAccessor<EntityStore> componentAccessor)public
Ref<EntityStore> getInteractionIterationTarget()@Nullable
public
StateMappingHelper getStateHelper()public
int getStateIndex()public
String getStateName()@Nonnull
public
String getStateName(int state, int subState)@Nonnull
public
StateTransitionController getStateTransitionController()@Nullable
public
int getSubStateIndex()public
boolean hasContextualInteraction(Ref<EntityStore> playerReference, String context)public
boolean inState(int state)public
boolean inState(int state, int subState)public
boolean inState(String state, String subState)public
boolean inSubState(int subState)public
boolean isComponentInState(int componentIndex, int targetState)public
boolean isInBusyState()public
boolean isRunningTransitionActions()public
boolean pollNeedClearOnce()public
void postRoleBuilt(BuilderSupport builderSupport)public
void resetLocalStateMachines()public
boolean runTransitionActions(Ref<EntityStore> ref, Role role, double dt, Store<EntityStore> store)public
void setComponentState(int componentIndex, int targetState)public
void setInteractable(Ref<EntityStore> playerReference, boolean interactable)public
void setInteractionIterationTarget(Ref<EntityStore> playerReference)public
void setState(int state, int subState, boolean clearOnce, boolean skipTransition)public
void setSubState(String subState)public
void update(ComponentAccessor<EntityStore> componentAccessor)public
boolean willInteractWith(Ref<EntityStore> playerReference)Fields
Protected Fields (14)
protected
Int2ObjectMap<IntSet> busyStatesprotected
Int2IntMap componentLocalStateMachinesprotected
Map<Ref<EntityStore>, String> contextualInteractionsprotected
Set<Ref<EntityStore>> interactablePlayersprotected
Set<Ref<EntityStore>> interactedPlayersprotected
Ref<EntityStore> interactionIterationTargetprotected
BitSet localStateMachineAutoResetStatesprotected
boolean needClearOnceprotected
int startStateprotected
int startSubStateprotected
int stateprotected
StateMappingHelper stateHelperprotected
StateTransitionController stateTransitionControllerprotected
int subState