Interface EntitySenses
public interface EntitySenses
Represents a mob's senses and groups of
Sensors.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a Sensor to this mob's senses.@NotNull MobFetches the Entity this EntitySenses belongs to.Fetches a list of all sensors that this mob has enabled.booleanhasSensor(@NotNull NamespacedKey key) Whether this mob has a Sensor by its NamespacedKey.voidremoveSensor(@NotNull Sensor<?> sensor) Removes a Sensor from this mob's senses.voidremoveSensor(@NotNull NamespacedKey key) Removes a Sensor by its NamespacedKey from this mob's senses.
-
Method Details
-
getEntity
-
getSensors
-
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
-