public class Diode extends MaterialData implements Directional, Redstone
限定符和类型 | 字段和说明 |
---|---|
protected static int |
DEFAULT_DELAY |
protected static BlockFace |
DEFAULT_DIRECTION |
protected static boolean |
DEFAULT_STATE |
构造器和说明 |
---|
Diode()
构造一个开启状态的、1延迟、默认朝向(北)的红石中继器.
|
Diode(BlockFace facingDirection)
构造一个关闭状态的、1延迟、指定朝向的红石中继器.
|
Diode(BlockFace facingDirection,
int delay)
构造一个关闭状态的、指定延迟、指定朝向的红石中继器.
|
Diode(BlockFace facingDirection,
int delay,
boolean state)
构造一个开启或关闭状态的、指定延迟、指定朝向的红石中继器.
|
Diode(int type)
已过时。
不安全的参数
|
Diode(int type,
byte data)
已过时。
不安全的参数
|
Diode(Material type) |
Diode(Material type,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Diode |
clone() |
int |
getDelay()
获取这个红石中继器的延迟 (以刻为单位).
|
BlockFace |
getFacing()
获取这个红石中继器的朝向.
|
boolean |
isPowered()
检测这个红石中继器是否充能.
|
void |
setDelay(int delay)
设置这个红石中继器的延迟.
|
void |
setFacingDirection(BlockFace face)
设置这个红石中继器的朝向.
|
java.lang.String |
toString() |
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
protected static final BlockFace DEFAULT_DIRECTION
protected static final int DEFAULT_DELAY
protected static final boolean DEFAULT_STATE
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.
public Diode(BlockFace facingDirection)
原文:Constructs a diode switched off, with a delay of 1 and facing the specified direction.
facingDirection
- 朝向BlockFace
public Diode(BlockFace facingDirection, int delay)
原文:Constructs a diode switched off, with the specified delay and facing the specified direction.
facingDirection
- 朝向delay
- 红石刻 (1-4)BlockFace
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
- 刻 (1-4)state
- 激活状态BlockFace
@Deprecated public Diode(int type)
type
- the raw type idpublic Diode(Material type)
@Deprecated public Diode(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Diode(Material type, byte data)
type
- the typedata
- the raw data valuepublic void setDelay(int delay)
原文:Sets the delay of the repeater.
delay
- 延迟 (1-4)public int getDelay()
原文:Gets the delay of the repeater in ticks.
public void setFacingDirection(BlockFace face)
原文:Sets the direction this diode is facing.
setFacingDirection
在接口中 Directional
face
- 朝向BlockFace
public BlockFace getFacing()
原文:Gets the direction this diode is facing
getFacing
在接口中 Directional
BlockFace
public java.lang.String toString()
toString
在类中 MaterialData
public Diode clone()
clone
在类中 MaterialData