Class Diode

All Implemented Interfaces:
Cloneable, Directional, Redstone

@Deprecated public class Diode extends MaterialData implements Directional, Redstone
Deprecated.
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.
See Also:
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
    Deprecated.
     
    protected static final BlockFace
    Deprecated.
     
    protected static final boolean
    Deprecated.
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated.
    Constructs a diode switched on, with a delay of 1 and facing the default direction (north).
    Diode(BlockFace facingDirection)
    Deprecated.
    Constructs a diode switched off, with a delay of 1 and facing the specified direction.
    Diode(BlockFace facingDirection, int delay)
    Deprecated.
    Constructs a diode switched off, with the specified delay and facing the specified direction.
    Diode(BlockFace facingDirection, int delay, boolean state)
    Deprecated.
    Constructs a diode switched on or off, with the specified delay and facing the specified direction.
    Deprecated.
     
    Diode(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Deprecated.
     
    int
    Deprecated.
    Gets the delay of the repeater in ticks.
    Deprecated.
    Gets the direction this diode is facing
    boolean
    Deprecated.
    Checks if the diode is powered.
    void
    setDelay(int delay)
    Deprecated.
    Sets the delay of the repeater.
    void
    Deprecated.
    Sets the direction this diode is facing.
    Deprecated.
     

    Methods inherited from class org.bukkit.material.MaterialData Link icon

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

    Methods inherited from class java.lang.Object Link icon

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details Link icon

    • DEFAULT_DIRECTION Link icon

      protected static final BlockFace DEFAULT_DIRECTION
      Deprecated.
    • DEFAULT_DELAY Link icon

      protected static final int DEFAULT_DELAY
      Deprecated.
      See Also:
    • DEFAULT_STATE Link icon

      protected static final boolean DEFAULT_STATE
      Deprecated.
      See Also:
  • Constructor Details Link icon

    • Diode Link icon

      public Diode()
      Deprecated.
      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 Link icon

      public Diode(BlockFace facingDirection)
      Deprecated.
      Constructs a diode switched off, with a delay of 1 and facing the specified direction.
      Parameters:
      facingDirection - the direction the diode is facing
      See Also:
    • Diode Link icon

      public Diode(BlockFace facingDirection, int delay)
      Deprecated.
      Constructs a diode switched off, with the specified delay and facing the specified direction.
      Parameters:
      facingDirection - the direction the diode is facing
      delay - The number of ticks (1-4) before the diode turns on after being powered
      See Also:
    • Diode Link icon

      public Diode(BlockFace facingDirection, int delay, boolean state)
      Deprecated.
      Constructs a diode switched on or off, with the specified delay and facing the specified direction.
      Parameters:
      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
      See Also:
    • Diode Link icon

      public Diode(Material type)
      Deprecated.
    • Diode Link icon

      @Deprecated public Diode(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details Link icon

    • setDelay Link icon

      public void setDelay(int delay)
      Deprecated.
      Sets the delay of the repeater.
      Parameters:
      delay - The new delay (1-4)
    • getDelay Link icon

      public int getDelay()
      Deprecated.
      Gets the delay of the repeater in ticks.
      Returns:
      The delay (1-4)
    • setFacingDirection Link icon

      public void setFacingDirection(BlockFace face)
      Deprecated.
      Sets the direction this diode is facing.
      Specified by:
      setFacingDirection in interface Directional
      Parameters:
      face - The direction to set this diode to
      See Also:
    • getFacing Link icon

      public BlockFace getFacing()
      Deprecated.
      Gets the direction this diode is facing
      Specified by:
      getFacing in interface Directional
      Returns:
      The direction this diode is facing
      See Also:
    • toString Link icon

      public String toString()
      Deprecated.
      Overrides:
      toString in class MaterialData
    • clone Link icon

      public Diode clone()
      Deprecated.
      Overrides:
      clone in class MaterialData
    • isPowered Link icon

      public boolean isPowered()
      Deprecated.
      Checks if the diode is powered.
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if the diode is powered