Interface EntitySenses


public interface EntitySenses
Represents a mob's senses and groups of Sensors.
  • Method Details

    • getEntity

      @NotNull @NotNull Mob getEntity()
      Fetches the Entity this EntitySenses belongs to.
      Returns:
      Mob
    • getSensors

      @NotNull @NotNull List<Sensor<?>> getSensors()
      Fetches a list of all sensors that this mob has enabled.
      Returns:
      List of Sensors
    • addSensor

      void addSensor(@NotNull @NotNull Sensor<?> sensor) throws IllegalArgumentException
      Adds a Sensor to this mob's senses.
      Parameters:
      sensor - Sensor to Add
      Throws:
      IllegalArgumentException - if sensor is not registered
    • removeSensor

      void removeSensor(@NotNull @NotNull Sensor<?> sensor)
      Removes a Sensor from this mob's senses.
      Parameters:
      sensor - Sensor to Remove
    • removeSensor

      void removeSensor(@NotNull @NotNull NamespacedKey key)
      Removes a Sensor by its NamespacedKey from this mob's senses.
      Parameters:
      key - NamespacedKey to Remove
    • hasSensor

      boolean hasSensor(@NotNull @NotNull NamespacedKey key)
      Whether this mob has a Sensor by its NamespacedKey.
      Parameters:
      key - NamespacedKey to Check
      Returns:
      true if sensor exists, false otherwise