接口 Sniffer

所有超级接口:
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.
  • 方法详细资料

    • getExploredLocations

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

      void removeExploredLocation(@NotNull @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.
      参数:
      location - the location to remove
      另请参阅:
    • 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.
      参数:
      location - the location to add
      另请参阅:
    • getState

      Get the current state of the sniffer.
      返回:
      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.
      参数:
      state - the new state
    • findPossibleDigLocation

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

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