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 intRepresents the Default Scan Rate of 20 Ticks. -
Method Summary
Modifier and TypeMethodDescriptionFetches the Class Type related to this Sensor.intFetches 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.voidrun(@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
-
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
-
run
Performs the Sensor's action.- Parameters:
w- Worldentity- Entity
-