程序包 org.bukkit.block

接口 Conduit

所有超级接口:
BlockState, Metadatable, PersistentDataHolder, TileState

public interface Conduit extends TileState
代表潮涌核心.
  • 方法详细资料

    • isActive

      boolean isActive()
      检查此潮涌核心是否处于激活状态.

      原文: Checks whether or not this conduit is active.

      A conduit is considered active if there are at least 16 valid frame blocks surrounding it and the conduit is surrounded by a 3x3x3 area of water source blocks (or waterlogged blocks), at which point its animation will activate, start spinning, and apply effects to nearby players. 如果周围有至少16个有效的框架方块, 并且潮涌核心被3x3x3的水源方块(或含水方块)区域包围, 则认为潮涌核心处于激活状态, 此时它的动画将激活, 开始旋转, 并对附近的玩家施加效果.

      返回:
      如果激活返回true, 否则返回false
    • isHunting

      boolean isHunting()
      获取此潮涌核心是否正在积极寻找附近的敌对生物.

      原文: Get whether or not this conduit is actively hunting for nearby hostile creatures.

      A conduit will hunt if it is active (see isActive()) and its frame is complete (it is surrounded by at least 42 valid frame blocks). While hunting, the conduit's target, if within its hunting area, will be damaged every 2 seconds. 如果潮涌核心处于激活状态(参见 isActive())且其框架完整(周围有至少42个有效框架方块), 则会进行狩猎. 狩猎时, 如果潮涌核心的 目标在其 狩猎区域内, 将每2秒受到一次伤害.

      返回:
      如果正在狩猎返回true, 否则返回false
    • getFrameBlocks

      @NotNull @NotNull Collection<Block> getFrameBlocks()
      获取构成此潮涌核心框架的所有 方块集合. 返回的集合将只包含潮涌核心所需的有效框架类型的方块, 不包括潮涌核心正在搜索的方块, 这意味着集合的大小将根据调用时潮涌核心周围有多少有效框架而变化.

      原文: Get a Collection of all Blocks that make up the frame of this conduit. The returned collection will contain only blocks that match the types required by the conduit to make up a valid frame, not the blocks at which the conduit is searching, meaning it will be of variable size depending on how many valid frames are surrounding the conduit at the time of invocation.

      返回:
      框架方块
    • getFrameBlockCount

      int getFrameBlockCount()
      获取当前围绕潮涌核心的有效框架方块数量.

      原文: Get the amount of valid frame blocks that are currently surrounding the conduit.

      返回:
      框架方块数量
    • getRange

      int getRange()
      获取玩家将获得潮涌核心益处的范围(以方块为单位).

      原文: Get the range (measured in blocks) within which players will receive the conduit's benefits.

      返回:
      潮涌核心范围
    • setTarget

      boolean setTarget(@Nullable @Nullable LivingEntity target)
      设置潮涌核心的狩猎目标.

      原文: Set the conduit's hunting target.

      Note that the value set by this method may be overwritten by the conduit's periodic hunting logic. If the target is ever set to null, the conduit will continue to look for a new target. Additionally, if the target is set to an entity that does not meet a conduit's hunting conditions (e.g. the entity is not within the hunting area, has already been killed, etc.) then the passed entity will be ignored and the conduit will also continue to look for a new target. 请注意, 此方法设置的值可能会被潮涌核心的周期性狩猎逻辑覆盖. 如果目标被设置为 null, 潮涌核心将继续寻找新目标. 此外, 如果目标被设置为不符合潮涌核心狩猎条件的实体 (例如实体不在 狩猎区域内, 已经被杀死等), 则传递的实体将被忽略, 潮涌核心也将继续寻找新目标.

      参数:
      target - 目标实体, 或null以移除目标
      返回:
      如果目标被更改返回true, 如果目标相同返回false
    • getTarget

      获取潮涌核心的狩猎目标.

      原文: Get the conduit's hunting target.

      返回:
      狩猎目标, 如果潮涌核心没有目标则返回null
    • hasTarget

      boolean hasTarget()
      检查此潮涌核心是否有活动的(存活的)狩猎目标.

      原文: Check whether or not this conduit has an active (alive) hunting target.

      返回:
      如果有狩猎目标返回true, 否则返回false
    • getHuntingArea

      @NotNull @NotNull BoundingBox getHuntingArea()
      获取潮涌核心将在其中搜索敌对实体作为目标的 边界框(相对于真实世界坐标).

      原文: Get a BoundingBox (relative to real-world coordinates) in which the conduit will search for hostile entities to target.

      返回:
      狩猎区域边界框