Interface EntitySenses
public interface EntitySenses
Represents a mob's senses and groups of
Sensor
s.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a Sensor to this mob's senses.Fetches the Entity this EntitySenses belongs to.Fetches a list of all sensors that this mob has enabled.boolean
Whether this mob has a Sensor by its NamespacedKey.void
removeSensor
(@NotNull Sensor<?> sensor) Removes a Sensor from this mob's senses.void
Removes a Sensor by its NamespacedKey from this mob's senses.
-
Method Details
-
getEntity
Fetches the Entity this EntitySenses belongs to.- Returns:
- Mob
-
getSensors
Fetches a list of all sensors that this mob has enabled.- Returns:
- List of Sensors
-
addSensor
Adds a Sensor to this mob's senses.- Parameters:
sensor
- Sensor to Add- Throws:
IllegalArgumentException
- if sensor is not registered
-
removeSensor
Removes a Sensor from this mob's senses.- Parameters:
sensor
- Sensor to Remove
-
removeSensor
Removes a Sensor by its NamespacedKey from this mob's senses.- Parameters:
key
- NamespacedKey to Remove
-
hasSensor
Whether this mob has a Sensor by its NamespacedKey.- Parameters:
key
- NamespacedKey to Check- Returns:
- true if sensor exists, false otherwise
-