public class Comparator extends MaterialData implements Directional, Redstone
限定符和类型 | 字段和说明 |
---|---|
protected static BlockFace |
DEFAULT_DIRECTION |
protected static boolean |
DEFAULT_STATE |
protected static boolean |
DEFAULT_SUBTRACTION_MODE |
构造器和说明 |
---|
Comparator()
构造一个关闭状态的、默认模式默认朝向(北)的红石比较器.
|
Comparator(BlockFace facingDirection)
构造一个关闭状态的、默认模式指定朝向的红石比较器.
|
Comparator(BlockFace facingDirection,
boolean isSubtraction)
构造一个关闭状态的、指定模式指定朝向的红石比较器.
|
Comparator(BlockFace facingDirection,
boolean isSubtraction,
boolean state)
构造一个开启或关闭状态的、指定模式指定朝向的红石比较器.
|
Comparator(int type)
已过时。
不安全的参数
|
Comparator(int type,
byte data)
已过时。
不安全的参数
|
Comparator(Material type) |
Comparator(Material type,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
Comparator |
clone() |
BlockFace |
getFacing()
获取这个红石比较器的朝向.
|
boolean |
isBeingPowered()
检测这个红石比较器是否输出信号.
|
boolean |
isPowered()
检测这个红石比较器是否充能.
|
boolean |
isSubtractionMode()
检测这个红石即比较器是否为减法模式.
|
void |
setFacingDirection(BlockFace face)
设置这个红石比较器的朝向.
|
void |
setSubtractionMode(boolean isSubtraction)
设置该红石比较器是否为减法模式.
|
java.lang.String |
toString() |
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
protected static final BlockFace DEFAULT_DIRECTION
protected static final boolean DEFAULT_SUBTRACTION_MODE
protected static final boolean DEFAULT_STATE
public Comparator()
原文:Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).
public Comparator(BlockFace facingDirection)
原文:Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.
facingDirection
- 朝向BlockFace
public Comparator(BlockFace facingDirection, boolean isSubtraction)
原文:Constructs a comparator switched off, with the specified mode and facing the specified direction.
facingDirection
- 朝向isSubtraction
- true 如果红石比较器为减法模式BlockFace
public Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state)
原文:Constructs a comparator switched on or off, with the specified mode and facing the specified direction.
facingDirection
- 朝向isSubtraction
- true 如果红石比较器为减法模式state
- 激活状态BlockFace
@Deprecated public Comparator(int type)
type
- the raw type idpublic Comparator(Material type)
@Deprecated public Comparator(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public Comparator(Material type, byte data)
type
- the typedata
- the raw data valuepublic void setSubtractionMode(boolean isSubtraction)
原文:Sets whether the comparator is in subtraction mode.
isSubtraction
- true 如果红石比较器为减法模式public boolean isSubtractionMode()
原文:Checks whether the comparator is in subtraction mode
public void setFacingDirection(BlockFace face)
原文:Sets the direction this comparator is facing
setFacingDirection
在接口中 Directional
face
- 朝向BlockFace
public BlockFace getFacing()
原文:Gets the direction this comparator is facing
getFacing
在接口中 Directional
BlockFace
public java.lang.String toString()
toString
在类中 MaterialData
public Comparator clone()
clone
在类中 MaterialData
public boolean isPowered()
原文:Checks if the comparator is powered
public boolean isBeingPowered()
原文:Checks if the comparator is being powered