Package cn.nukkit.entity.ai.sensor
Interface ISensor
- All Known Implementing Classes:
EntityAttackedByOwnerSensor
,NearestFeedingPlayerSensor
,NearestPlayerSensor
,NearestTargetEntitySensor
,RouteUnreachableTimeSensor
,WolfNearestFeedingPlayerSensor
此接口抽象了一个传感器
传感器用于搜集环境信息并向记忆存储器
传感器用于搜集环境信息并向记忆存储器
IMemoryStorage
写入一个记忆MemoryType
This interface abstracts a sensor
The sensor is used to collect environmental information and write a memory MemoryType
to the memory storage IMemoryStorage
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
返回此传感器的刷新周期,小的刷新周期会使得传感器被更频繁的调用void
sense
(EntityIntelligent entity)
-
Method Details
-
sense
- Parameters:
entity
- 目标实体
-
getPeriod
default int getPeriod()返回此传感器的刷新周期,小的刷新周期会使得传感器被更频繁的调用Returns the refresh period of this sensor, a small refresh period will make the sensor be called more frequently
- Returns:
- 刷新周期
-