Class StateEvaluator
java.lang.Object
com.hypixel.hytale.server.npc.decisionmaker.core.Evaluator<StateOption>
com.hypixel.hytale.server.npc.decisionmaker.stateevaluator.StateEvaluator
- All Implemented Interfaces:
Component<EntityStore>,Cloneable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.hypixel.hytale.server.npc.decisionmaker.core.Evaluator
Evaluator.OptionHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstatic final BuilderCodec<StateEvaluator> private final EvaluationContextprotected doubleprotected doubleprotected StateOption[]protected doubleprivate doubleFields inherited from class com.hypixel.hytale.server.npc.decisionmaker.core.Evaluator
LOGGER, NOT_USED, optionsFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static ComponentType<EntityStore, StateEvaluator> booleanisActive()voidvoidvoidprepareOptions(StateMappingHelper stateHelper) voidsetActive(boolean active) booleanshouldExecute(double interval) toString()Methods inherited from class com.hypixel.hytale.server.npc.decisionmaker.core.Evaluator
evaluate, initialise, setupNPC, setupNPCMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
CODEC
-
rawOptions
-
executeFrequency
protected double executeFrequency -
stateChangeCooldown
protected double stateChangeCooldown -
minimumUtility
protected double minimumUtility -
timeUntilNextExecute
private double timeUntilNextExecute -
active
private boolean active -
evaluationContext
-
-
Constructor Details
-
StateEvaluator
protected StateEvaluator()
-
-
Method Details
-
getComponentType
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
getEvaluationContext
-
prepareOptions
-
shouldExecute
public boolean shouldExecute(double interval) -
prepareEvaluationContext
-
onStateSwitched
public void onStateSwitched() -
toString
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Overrides:
clonein classObject
-