Class Evaluator.OptionHolder
java.lang.Object
com.hypixel.hytale.server.npc.decisionmaker.core.Evaluator.OptionHolder
- All Implemented Interfaces:
IWeightedElement
- Direct Known Subclasses:
CombatActionEvaluator.CombatOptionHolder,StateEvaluator.SelfOptionHolder
- Enclosing class:
Evaluator<OptionType extends Option>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doublecalculateUtility(int var1, ArchetypeChunk<EntityStore> var2, CommandBuffer<EntityStore> var3, EvaluationContext var4) doublegetTotalUtility(double threshold) doubledoubledoubletryPick(double currentWeight, double threshold)
-
Field Details
-
option
-
utility
protected double utility
-
-
Constructor Details
-
OptionHolder
-
-
Method Details
-
getWeight
public double getWeight()- Specified by:
getWeightin interfaceIWeightedElement
-
getWeightCoefficient
public double getWeightCoefficient() -
getOption
-
getTotalUtility
public double getTotalUtility(double threshold) -
tryPick
public double tryPick(double currentWeight, double threshold) -
calculateUtility
public abstract double calculateUtility(int var1, ArchetypeChunk<EntityStore> var2, CommandBuffer<EntityStore> var3, EvaluationContext var4)
-