Interface Sniffer

All Superinterfaces:
Ageable, Animals, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter

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

    • getExploredLocations

      @NotNull @NotNull Collection<Location> getExploredLocations()
      Gets the locations explored by the sniffer.
      Returns:
      a collection of locations
    • removeExploredLocation

      void removeExploredLocation(@NotNull @NotNull Location location)
      Remove a location of the explored locations.
      Parameters:
      location - the location to remove
      See Also:
    • addExploredLocation

      void addExploredLocation(@NotNull @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

      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 @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