Skip to content

FeatureEvaluatorHelper

Package: com.hypixel.hytale.server.npc.asset.builder

public class FeatureEvaluatorHelper

Manages feature provider evaluation for builders. Tracks a list of provider evaluators, supports locking (making the list immutable), and validates that referenced features are provided and component requirements are met. Used to ensure that actions and motions in the NPC behavior tree have access to the target types they need (Player, NPC, Position, etc.).

public FeatureEvaluatorHelper()
public FeatureEvaluatorHelper(boolean couldRequireFeature)
public void add(ProviderEvaluator evaluator)

Adds a provider evaluator. Must be called before lock().

public boolean canAddProvider()

Returns true if the helper has not been locked.

@Nonnull
public FeatureEvaluatorHelper lock()

Makes the evaluator list immutable and returns this.

public void setContainsReference()

Marks that this helper contains a provider reference that needs deferred validation.

@Nonnull
public List<ProviderEvaluator> getProviders()
public void validateProviderReferences(BuilderManager manager, ExecutionContext context)

Validates all registered provider reference validators.

public void validateComponentRequirements(FeatureEvaluatorHelper providers, ExecutionContext context)

Validates that all component requirements are satisfied by the given providers.

addProviderReferenceValidator / addComponentRequirementValidator

Section titled “addProviderReferenceValidator / addComponentRequirementValidator”
public void addProviderReferenceValidator(BiConsumer<BuilderManager, ExecutionContext> referenceValidator)
public void addComponentRequirementValidator(BiConsumer<FeatureEvaluatorHelper, ExecutionContext> validator)

disallowParameterProviders / isDisallowParameterProviders

Section titled “disallowParameterProviders / isDisallowParameterProviders”
public void disallowParameterProviders()
public boolean isDisallowParameterProviders()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.