Package org.bukkit.material
Class Diode
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Diode
- All Implemented Interfaces:
Cloneable
,Directional
,Redstone
Deprecated.
Represents a diode/repeater in the on or off state, with a delay and facing
in a specific direction.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static int
Deprecated.protected static BlockFace
Deprecated.protected static boolean
Deprecated. -
Constructor Summary
ConstructorDescriptionDiode()
Deprecated.Constructs a diode switched on, with a delay of 1 and facing the default direction (north).Deprecated.Constructs a diode switched off, with a delay of 1 and facing the specified direction.Deprecated.Constructs a diode switched off, with the specified delay and facing the specified direction.Deprecated.Constructs a diode switched on or off, with the specified delay and facing the specified direction.Deprecated.Deprecated.Magic value -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated.int
getDelay()
Deprecated.Gets the delay of the repeater in ticks.Deprecated.Gets the direction this diode is facingboolean
Deprecated.Checks if the diode is powered.void
setDelay(int delay)
Deprecated.Sets the delay of the repeater.void
setFacingDirection(BlockFace face)
Deprecated.Sets the direction this diode is facing.toString()
Deprecated.Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack
-
Field Details
-
DEFAULT_DIRECTION
Deprecated. -
DEFAULT_DELAY
protected static final int DEFAULT_DELAYDeprecated.- See Also:
- Constant Field Values
-
DEFAULT_STATE
protected static final boolean DEFAULT_STATEDeprecated.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Diode
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
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:
BlockFace
-
Diode
Deprecated.Constructs a diode switched off, with the specified delay and facing the specified direction.- Parameters:
facingDirection
- the direction the diode is facingdelay
- The number of ticks (1-4) before the diode turns on after being powered- See Also:
BlockFace
-
Diode
Deprecated.Constructs a diode switched on or off, with the specified delay and facing the specified direction.- Parameters:
facingDirection
- the direction the diode is facingdelay
- The number of ticks (1-4) before the diode turns on after being poweredstate
- True if the diode is in the on state- See Also:
BlockFace
-
Diode
Deprecated. -
Diode
Deprecated.Magic value- Parameters:
type
- the typedata
- the raw data value
-
-
Method Details
-
setDelay
public void setDelay(int delay)Deprecated.Sets the delay of the repeater.- Parameters:
delay
- The new delay (1-4)
-
getDelay
public int getDelay()Deprecated.Gets the delay of the repeater in ticks.- Returns:
- The delay (1-4)
-
setFacingDirection
Deprecated.Sets the direction this diode is facing.- Specified by:
setFacingDirection
in interfaceDirectional
- Parameters:
face
- The direction to set this diode to- See Also:
BlockFace
-
getFacing
Deprecated.Gets the direction this diode is facing- Specified by:
getFacing
in interfaceDirectional
- Returns:
- The direction this diode is facing
- See Also:
BlockFace
-
toString
Deprecated.- Overrides:
toString
in classMaterialData
-
clone
Deprecated.- Overrides:
clone
in classMaterialData
-
isPowered
public boolean isPowered()Deprecated.Checks if the diode is powered.
-
BlockData
.