Class Diode

All Implemented Interfaces:
Cloneable, Directional, Redstone

@Deprecated(since="1.13", forRemoval=true) public class Diode extends MaterialData implements Directional, Redstone
Deprecated, for removal: This API element is subject to removal in a future version.
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

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final BlockFace
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a diode switched on, with a delay of 1 and facing the default direction (north).
    Diode(BlockFace facingDirection)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a diode switched off, with a delay of 1 and facing the specified direction.
    Diode(BlockFace facingDirection, int delay)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a diode switched off, with the specified delay and facing the specified direction.
    Diode(BlockFace facingDirection, int delay, boolean state)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a diode switched on or off, with the specified delay and facing the specified direction.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Diode(Material type, byte data)
    Deprecated.
    Magic value
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the delay of the repeater in ticks.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the direction this diode is facing
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the diode is powered.
    void
    setDelay(int delay)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the delay of the repeater.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the direction this diode is facing.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.MaterialData

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

    Methods inherited from class java.lang.Object

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

    • DEFAULT_DIRECTION

      protected static final BlockFace DEFAULT_DIRECTION
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_DELAY

      protected static final int DEFAULT_DELAY
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • DEFAULT_STATE

      protected static final boolean DEFAULT_STATE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • Diode

      public Diode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public Diode(BlockFace facingDirection, int delay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public Diode(BlockFace facingDirection, int delay, boolean state)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public Diode(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Diode

      @Deprecated(since="1.6.2") public Diode(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • setDelay

      public void setDelay(int delay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the delay of the repeater.
      Parameters:
      delay - The new delay (1-4)
    • getDelay

      public int getDelay()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the delay of the repeater in ticks.
      Returns:
      The delay (1-4)
    • setFacingDirection

      public void setFacingDirection(BlockFace face)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public BlockFace getFacing()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the direction this diode is facing
      Specified by:
      getFacing in interface Directional
      Returns:
      The direction this diode is facing
      See Also:
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class MaterialData
    • clone

      public Diode clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class MaterialData
    • isPowered

      public boolean isPowered()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if the diode is powered.
      Specified by:
      isPowered in interface Redstone
      Returns:
      true if the diode is powered