Package cn.nukkit.entity.ai.evaluator
Class PassByTimeEvaluator
java.lang.Object
cn.nukkit.entity.ai.evaluator.PassByTimeEvaluator
- All Implemented Interfaces:
IBehaviorEvaluator
@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public class PassByTimeEvaluator
extends Object
implements IBehaviorEvaluator
用于判断一个时间类型的记忆是否在指定范围内的评估器
An evaluator used to determine whether a time type of memory is within a specified range
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPassByTimeEvaluator
(MemoryType<Integer> timedMemory, int minPassByTimeRange, int maxPassByTimeRange) 用于判断一个时间类型的记忆是否在指定范围内的评估器 -
Method Summary
-
Field Details
-
timedMemory
-
minPassByTimeRange
protected int minPassByTimeRange -
maxPassByTimeRange
protected int maxPassByTimeRange
-
-
Constructor Details
-
PassByTimeEvaluator
public PassByTimeEvaluator(MemoryType<Integer> timedMemory, int minPassByTimeRange, int maxPassByTimeRange) 用于判断一个时间类型的记忆是否在指定范围内的评估器An evaluator used to determine whether a time type of memory is within a specified range
- Parameters:
timedMemory
- the timed memoryminPassByTimeRange
- the min pass by time rangemaxPassByTimeRange
- the max pass by time range
-
-
Method Details
-
evaluate
Description copied from interface:IBehaviorEvaluator
是否需要激活与其绑定的执行器这个方法对一个行为只会评估一次,评估通过则开始运行执行器执行行为,直到行为中断或者完成,下一次评估才会开始
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
- Specified by:
evaluate
in interfaceIBehaviorEvaluator
- Parameters:
entity
- 评估目标实体
Assess the targetEntity- Returns:
- 是否需要激活
Do you need to activate
-