Class StateMappingHelper
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.StateMappingHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private booleanprivate it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<String> private booleanprivate ArrayDeque<StateMappingHelper.StateDepth> static final Stringstatic final Stringstatic final Stringprivate Stringprivate intprivate Stringprivate intprivate booleanprivate StateMappingHelper.StateMapprivate booleanstatic final Stringprivate it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<StateMappingHelper.IStateMap> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidint[]private voidgetAndPutIndex(String state, String subState, BiConsumer<Integer, Integer> setter, Function<String, Integer> mainStateFunction, BiFunction<Integer, String, Integer> subStateFunction) voidgetAndPutSensorIndex(String state, String subState, BiConsumer<Integer, Integer> setter) voidgetAndPutSetterIndex(String state, String subState, BiConsumer<Integer, Integer> setter) voidgetAndPutStateRequirerIndex(String state, String subState, BiConsumer<Integer, Integer> setter) intintgetHighestSubStateIndex(int mainStateIndex) intgetStateIndex(String state) getStateName(int index) intgetSubStateIndex(int index, String subState) getSubStateName(int index, int subState) booleanbooleanintvoidvoidinitialiseComponentState(BuilderSupport support) private StateMappingHelper.IStateMapinitialiseDefaultSubStates(int index) booleanvoidoptimise()voidpopComponentState(BuilderSupport support) voidreadComponentDefaultLocalState(com.google.gson.JsonObject data) voidsetComponentImportStateMappings(com.google.gson.JsonArray states) voidsetDefaultSubState(String subState) voidvoidvoidvoid
-
Field Details
-
DEFAULT_STATE
- See Also:
-
DEFAULT_SUB_STATE
- See Also:
-
DEFAULT_STATE_PARAMETER
- See Also:
-
STATE_CHANGE_RESET_PARAMETER
- See Also:
-
mainStateMap
-
allMainStates
private int[] allMainStates -
subStateMap
@Nullable private it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<StateMappingHelper.IStateMap> subStateMap -
depth
private int depth -
currentParentState
-
component
private boolean component -
hasStateEvaluator
private boolean hasStateEvaluator -
requiresStateEvaluator
private boolean requiresStateEvaluator -
defaultSubState
-
defaultComponentLocalState
-
defaultComponentLocalStateIndex
private int defaultComponentLocalStateIndex -
componentLocalStateAutoReset
private boolean componentLocalStateAutoReset -
componentImportStateMappings
-
singletonDefaultStateMap
-
-
Constructor Details
-
StateMappingHelper
public StateMappingHelper()
-
-
Method Details
-
getAllMainStates
public int[] getAllMainStates() -
getHighestSubStateIndex
public int getHighestSubStateIndex(int mainStateIndex) -
getAndPutSensorIndex
public void getAndPutSensorIndex(String state, String subState, @Nonnull BiConsumer<Integer, Integer> setter) -
getAndPutSetterIndex
public void getAndPutSetterIndex(String state, String subState, @Nonnull BiConsumer<Integer, Integer> setter) -
getAndPutStateRequirerIndex
public void getAndPutStateRequirerIndex(String state, String subState, @Nonnull BiConsumer<Integer, Integer> setter) -
getAndPutIndex
-
initialiseDefaultSubStates
-
validate
-
getStateIndex
-
getSubStateIndex
-
getStateName
-
getSubStateName
-
getCurrentParentState
-
increaseDepth
public void increaseDepth() -
decreaseDepth
public void decreaseDepth() -
setDefaultSubState
-
getDefaultSubState
-
setNotComponent
public void setNotComponent() -
isComponent
public boolean isComponent() -
hasComponentStates
public boolean hasComponentStates() -
initialiseComponentState
-
popComponentState
-
readComponentDefaultLocalState
public void readComponentDefaultLocalState(@Nonnull com.google.gson.JsonObject data) -
hasDefaultLocalState
public boolean hasDefaultLocalState() -
getDefaultLocalState
-
setComponentImportStateMappings
public void setComponentImportStateMappings(@Nonnull com.google.gson.JsonArray states) -
getComponentImportStateIndex
-
importedStateCount
public int importedStateCount() -
setRequiresStateEvaluator
public void setRequiresStateEvaluator() -
setHasStateEvaluator
public void setHasStateEvaluator() -
optimise
public void optimise()
-