Directional, Redstonepublic class Comparator extends MaterialData implements Directional, Redstone
| Modifier and Type | Field | Description |
|---|---|---|
protected static BlockFace |
DEFAULT_DIRECTION |
|
protected static boolean |
DEFAULT_STATE |
|
protected static boolean |
DEFAULT_SUBTRACTION_MODE |
| Constructor | Description |
|---|---|
Comparator() |
Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).
|
Comparator(int type) |
Deprecated.
Magic value
|
Comparator(int type,
byte data) |
Deprecated.
Magic value
|
Comparator(BlockFace facingDirection) |
Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.
|
Comparator(BlockFace facingDirection,
boolean isSubtraction) |
Constructs a comparator switched off, with the specified mode and facing the specified direction.
|
Comparator(BlockFace facingDirection,
boolean isSubtraction,
boolean state) |
Constructs a comparator switched on or off, with the specified mode and facing the specified direction.
|
Comparator(Material type) |
|
Comparator(Material type,
byte data) |
Deprecated.
Magic value
|
| Modifier and Type | Method | Description |
|---|---|---|
Comparator |
clone() |
|
BlockFace |
getFacing() |
Gets the direction this comparator is facing
|
boolean |
isBeingPowered() |
Checks if the comparator is being powered
|
boolean |
isPowered() |
Checks if the comparator is powered
|
boolean |
isSubtractionMode() |
Checks whether the comparator is in subtraction mode
|
void |
setFacingDirection(BlockFace face) |
Sets the direction this comparator is facing
|
void |
setSubtractionMode(boolean isSubtraction) |
Sets whether the comparator is in subtraction mode.
|
java.lang.String |
toString() |
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStackprotected static final BlockFace DEFAULT_DIRECTION
protected static final boolean DEFAULT_SUBTRACTION_MODE
protected static final boolean DEFAULT_STATE
public Comparator()
public Comparator(BlockFace facingDirection)
facingDirection - the direction the comparator is facingBlockFacepublic Comparator(BlockFace facingDirection, boolean isSubtraction)
facingDirection - the direction the comparator is facingisSubtraction - True if the comparator is in subtraction mode, false for normal comparator operationBlockFacepublic Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state)
facingDirection - the direction the comparator is facingisSubtraction - True if the comparator is in subtraction mode, false for normal comparator operationstate - True if the comparator is in the on stateBlockFace@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)
isSubtraction - True if the comparator is in subtraction mode, false for normal comparator operationpublic boolean isSubtractionMode()
public void setFacingDirection(BlockFace face)
setFacingDirection in interface Directionalface - The direction to set this comparator toBlockFacepublic BlockFace getFacing()
getFacing in interface DirectionalBlockFacepublic java.lang.String toString()
toString in class MaterialDatapublic Comparator clone()
clone in class MaterialDatapublic boolean isPowered()
public boolean isBeingPowered()