Interface IBehaviorEvaluator

All Known Subinterfaces:
IBehavior
All Known Implementing Classes:
AbstractBehavior, AllMatchEvaluator, AnyMatchEvaluator, Behavior, BlockCheckEvaluator, ConditionalProbabilityEvaluator, MemoryCheckEmptyEvaluator, MemoryCheckNotEmptyEvaluator, MultiBehaviorEvaluator, PassByTimeEvaluator, ProbabilityEvaluator, RandomTimeRangeEvaluator, WeightedMultiBehavior

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public interface IBehaviorEvaluator
此接口抽象了一个行为评估器
决定是否激活与其绑定的执行器

This interface abstracts a Behavior Evaluator that
decides whether to activate the Actuator bound to it

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    是否需要激活与其绑定的执行器
  • Method Details

    • evaluate

      boolean evaluate(EntityIntelligent entity)
      是否需要激活与其绑定的执行器

      这个方法对一个行为只会评估一次,评估通过则开始运行执行器执行行为,直到行为中断或者完成,下一次评估才会开始

      Whether the executor bound to it needs to be activated

      This method evaluates a behavior only once, and if the evaluation passes, the executor execution behavior will start running until the behavior is interrupted or completed, and the next evaluation will not begin

      Parameters:
      entity - 评估目标实体
      Assess the targetEntity
      Returns:
      是否需要激活
      Do you need to activate