Interface Sensor<T extends LivingEntity>
- Type Parameters:
T
- Entity Type related with this Sensor.
- All Superinterfaces:
Keyed
- All Known Implementing Classes:
CustomSensor
Represents an action performed when certain Memory
objects are present.
This is typically used for updating memories when other memories are present.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Represents the Default Scan Rate of 20 Ticks. -
Method Summary
Modifier and TypeMethodDescriptionFetches the Class Type related to this Sensor.int
Fetches the scan rate of how often to check for the memories inrequired()
, in ticks.required()
Fetches all the Memories required for this Sensor to be performed.void
run
(@NotNull World w, LivingEntity entity) Performs the Sensor's action.
-
Field Details
-
DEFAULT_SCAN_RATE
static final int DEFAULT_SCAN_RATERepresents the Default Scan Rate of 20 Ticks.- See Also:
-
-
Method Details
-
required
Fetches all the Memories required for this Sensor to be performed.- Returns:
- List of Required Memories
-
getScanRate
int getScanRate()Fetches the scan rate of how often to check for the memories inrequired()
, in ticks.- Returns:
- Memory Scan Rate, in Ticks
-
getEntityClass
Fetches the Class Type related to this Sensor.- Returns:
- Class Type
-
run
Performs the Sensor's action.- Parameters:
w
- Worldentity
- Entity
-