类 Diode

所有已实现的接口:
Cloneable, Directional, Redstone

@Deprecated(since="1.14.1") public class Diode extends MaterialData implements Directional, Redstone
已过时。
所有MaterialData的用法都已弃用并将被移除。 请使用BlockData。
表示一个处于开启或关闭状态的二极管/中继器,具有延迟并面向特定方向。
另请参阅:
  • 字段详细资料

    • DEFAULT_DIRECTION

      protected static final BlockFace DEFAULT_DIRECTION
      已过时。
    • DEFAULT_DELAY

      protected static final int DEFAULT_DELAY
      已过时。
      另请参阅:
    • DEFAULT_STATE

      protected static final boolean DEFAULT_STATE
      已过时。
      另请参阅:
  • 构造器详细资料

    • Diode

      public Diode()
      已过时。
      构造一个开启的二极管,延迟为1且面向默认方向(北)。

      原文:Constructs a diode switched on, with a delay of 1 and facing the default direction (north).

      默认情况下, 此构造函数创建一个开启的二极管, 以保持与过去实现的向后兼容性.

    • Diode

      public Diode(BlockFace facingDirection)
      已过时。
      构造一个关闭的二极管,延迟为1且面向指定方向。

      原文:Constructs a diode switched off, with a delay of 1 and facing the specified direction.

      参数:
      facingDirection - 二极管面向的方向
      另请参阅:
    • Diode

      public Diode(BlockFace facingDirection, int delay)
      已过时。
      构造一个关闭的二极管,具有指定延迟并面向指定方向。

      原文:Constructs a diode switched off, with the specified delay and facing the specified direction.

      参数:
      facingDirection - 二极管面向的方向
      delay - 二极管被充能后开启所需的 tick 数(1-4)
      另请参阅:
    • Diode

      public Diode(BlockFace facingDirection, int delay, boolean state)
      已过时。
      构造一个开启或关闭的二极管,具有指定延迟并面向指定方向。

      原文:Constructs a diode switched on or off, with the specified delay and facing the specified direction.

      参数:
      facingDirection - 二极管面向的方向
      delay - 二极管被充能后开启所需的 tick 数(1-4)
      state - 二极管是否处于开启状态
      另请参阅:
    • Diode

      public Diode(Material type)
      已过时。
    • Diode

      @Deprecated(since="1.6.2") public Diode(Material type, byte data)
      已过时。
      不安全的参数
      参数:
      type - 类型
      data - 原始数据值
  • 方法详细资料

    • setDelay

      public void setDelay(int delay)
      已过时。
      设置中继器的延迟。

      原文:Sets the delay of the repeater.

      参数:
      delay - 新延迟(1-4)
    • getDelay

      public int getDelay()
      已过时。
      获取中继器的延迟(以tick为单位)。

      原文:Gets the delay of the repeater in ticks.

      返回:
      延迟(1-4)
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      已过时。
      设置此二极管面向的方向。

      原文:Sets the direction this diode is facing.

      指定者:
      setFacingDirection 在接口中 Directional
      参数:
      face - 此二极管要面向的方向
      另请参阅:
    • getFacing

      public BlockFace getFacing()
      已过时。
      获取此二极管面向的方向。

      原文:Gets the direction this diode is facing.

      指定者:
      getFacing 在接口中 Directional
      返回:
      此二极管面向的方向
      另请参阅:
    • toString

      public String toString()
      已过时。
      覆盖:
      toString 在类中 MaterialData
    • clone

      public Diode clone()
      已过时。
      覆盖:
      clone 在类中 MaterialData
    • isPowered

      public boolean isPowered()
      已过时。
      检查二极管是否被充能。

      原文:Checks if the diode is powered.

      指定者:
      isPowered 在接口中 Redstone
      返回:
      二极管是否被充能