类 Diode

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

@Deprecated public class Diode extends MaterialData implements Directional, Redstone
已过时。
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents a diode/repeater in the on or off state, with a delay and facing in a specific direction.
另请参阅:
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    protected static final int
    已过时。
     
    protected static final BlockFace
    已过时。
     
    protected static final boolean
    已过时。
     
  • 构造器概要

    构造器
    构造器
    说明
    已过时。
    Constructs a diode switched on, with a delay of 1 and facing the default direction (north).
    Diode(BlockFace facingDirection)
    已过时。
    Constructs a diode switched off, with a delay of 1 and facing the specified direction.
    Diode(BlockFace facingDirection, int delay)
    已过时。
    Constructs a diode switched off, with the specified delay and facing the specified direction.
    Diode(BlockFace facingDirection, int delay, boolean state)
    已过时。
    Constructs a diode switched on or off, with the specified delay and facing the specified direction.
    已过时。
     
    Diode(Material type, byte data)
    已过时。
    Magic value
  • 方法概要

    修饰符和类型
    方法
    说明
    已过时。
     
    int
    已过时。
    Gets the delay of the repeater in ticks.
    已过时。
    Gets the direction this diode is facing
    boolean
    已过时。
    Checks if the diode is powered.
    void
    setDelay(int delay)
    已过时。
    Sets the delay of the repeater.
    void
    已过时。
    Sets the direction this diode is facing.
    已过时。
     

    从类继承的方法 org.bukkit.material.MaterialData

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    从类继承的方法 java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • 字段详细资料

    • 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()
      已过时。
      Constructs a diode switched on, with a delay of 1 and facing the default direction (north). By default this constructor creates a diode that is switched on for backwards compatibility with past implementations.
    • Diode

      public Diode(BlockFace facingDirection)
      已过时。
      Constructs a diode switched off, with a delay of 1 and facing the specified direction.
      参数:
      facingDirection - the direction the diode is facing
      另请参阅:
    • Diode

      public Diode(BlockFace facingDirection, int delay)
      已过时。
      Constructs a diode switched off, with the specified delay and facing the specified direction.
      参数:
      facingDirection - the direction the diode is facing
      delay - The number of ticks (1-4) before the diode turns on after being powered
      另请参阅:
    • 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 - the direction the diode is facing
      delay - The number of ticks (1-4) before the diode turns on after being powered
      state - True if the diode is in the on state
      另请参阅:
    • Diode

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

      @Deprecated public Diode(Material type, byte data)
      已过时。
      Magic value
      参数:
      type - the type
      data - the raw data value
  • 方法详细资料

    • setDelay

      public void setDelay(int delay)
      已过时。
      Sets the delay of the repeater.
      参数:
      delay - The new delay (1-4)
    • getDelay

      public int getDelay()
      已过时。
      Gets the delay of the repeater in ticks.
      返回:
      The delay (1-4)
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      已过时。
      Sets the direction this diode is facing.
      指定者:
      setFacingDirection 在接口中 Directional
      参数:
      face - The direction to set this diode to
      另请参阅:
    • getFacing

      public BlockFace getFacing()
      已过时。
      Gets the direction this diode is facing
      指定者:
      getFacing 在接口中 Directional
      返回:
      The direction this diode is facing
      另请参阅:
    • toString

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

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

      public boolean isPowered()
      已过时。
      Checks if the diode is powered.
      指定者:
      isPowered 在接口中 Redstone
      返回:
      true if the diode is powered