Interface Sniffer

All Superinterfaces:
Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

public interface Sniffer extends Animals
Represents a Sniffer.
  • Method Details

    • getExploredLocations

      @NotNull Collection<Location> getExploredLocations()
      Gets the locations explored by the sniffer.
      Note: the returned locations use sniffer's current world.
      Returns:
      a collection of locations
    • removeExploredLocation

      void removeExploredLocation(@NotNull Location location)
      Remove a location of the explored locations.
      Note: the location must be in the sniffer's current world for this method to have any effect.
      Parameters:
      location - the location to remove
      See Also:
    • addExploredLocation

      void addExploredLocation(@NotNull Location location)
      Add a location to the explored locations.
      Note: the location must be in the sniffer's current world for this method to have any effect.
      Parameters:
      location - the location to add
      See Also:
    • getState

      @NotNull Sniffer.State getState()
      Get the current state of the sniffer.
      Returns:
      the state of the sniffer
    • setState

      void setState(@NotNull Sniffer.State state)
      Set a new state for the sniffer.
      This will also make the sniffer make the transition to the new state.
      Parameters:
      state - the new state
    • findPossibleDigLocation

      @Nullable Location findPossibleDigLocation()
      Try to get a possible location where the sniffer can dig.
      Returns:
      a Location if found or null
    • canDig

      boolean canDig()
      Gets whether the sniffer can dig in the current Location below its head.
      Returns:
      true if can dig or false otherwise