接口 Sniffer

所有超级接口:
Ageable, Animals, Attributable, Breedable, CommandSender, Creature, Damageable, Entity, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, ProjectileSource, ServerOperator

public interface Sniffer extends Animals
代表嗅探兽。
  • 方法详细资料

    • getExploredLocations

      @NotNull @NotNull Collection<Location> getExploredLocations()
      获取嗅探兽已探索的位置。
      注意:返回的位置使用嗅探兽当前的世界。

      原文:Gets the locations explored by the sniffer.
      Note: the returned locations use sniffer's current world.

      返回:
      位置集合
    • 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 - 要移除的位置
      另请参阅:
    • 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 - 要添加的位置
      另请参阅:
    • getState

      获取嗅探兽的当前状态。

      原文:Get the current 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 - 新状态
    • findPossibleDigLocation

      @Nullable @Nullable Location findPossibleDigLocation()
      尝试获取嗅探兽可能挖掘的位置。

      原文:Try to get a possible location where the sniffer can dig.

      返回:
      如果找到则返回 Location,否则返回null
    • canDig

      boolean canDig()
      获取嗅探兽是否能在其头部下方的当前位置挖掘。

      原文:Gets whether the sniffer can dig in the current Location below its head.

      返回:
      如果能挖掘则为 true,否则为 false