Package org.bukkit.material
Class Comparator
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Comparator
- All Implemented Interfaces:
Cloneable,Directional,Redstone
@Deprecated public class Comparator extends MaterialData implements Directional, Redstone
Deprecated.
all usage of MaterialData is deprecated and subject to removal.
Use
BlockData.Represents a comparator in the on or off state, in normal or subtraction mode and facing in a specific direction.
-
Field Summary
Fields Modifier and Type Field Description protected static BlockFaceDEFAULT_DIRECTIONDeprecated.protected static booleanDEFAULT_STATEDeprecated.protected static booleanDEFAULT_SUBTRACTION_MODEDeprecated. -
Constructor Summary
Constructors Constructor Description Comparator()Deprecated.Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).Comparator(BlockFace facingDirection)Deprecated.Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.Comparator(BlockFace facingDirection, boolean isSubtraction)Deprecated.Constructs a comparator switched off, with the specified mode and facing the specified direction.Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state)Deprecated.Constructs a comparator switched on or off, with the specified mode and facing the specified direction.Comparator(Material type)Deprecated.Comparator(Material type, byte data)Deprecated.Magic value -
Method Summary
Modifier and Type Method Description Comparatorclone()Deprecated.BlockFacegetFacing()Deprecated.Gets the direction this comparator is facingbooleanisBeingPowered()Deprecated.Checks if the comparator is being poweredbooleanisPowered()Deprecated.Checks if the comparator is poweredbooleanisSubtractionMode()Deprecated.Checks whether the comparator is in subtraction modevoidsetFacingDirection(BlockFace face)Deprecated.Sets the direction this comparator is facingvoidsetSubtractionMode(boolean isSubtraction)Deprecated.Sets whether the comparator is in subtraction mode.StringtoString()Deprecated.Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack
-
Field Details
-
DEFAULT_DIRECTION
Deprecated. -
DEFAULT_SUBTRACTION_MODE
protected static final boolean DEFAULT_SUBTRACTION_MODEDeprecated.- See Also:
- Constant Field Values
-
DEFAULT_STATE
protected static final boolean DEFAULT_STATEDeprecated.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Comparator
public Comparator()Deprecated.Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north). -
Comparator
Deprecated.Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.- Parameters:
facingDirection- the direction the comparator is facing- See Also:
BlockFace
-
Comparator
Deprecated.Constructs a comparator switched off, with the specified mode and facing the specified direction.- Parameters:
facingDirection- the direction the comparator is facingisSubtraction- True if the comparator is in subtraction mode, false for normal comparator operation- See Also:
BlockFace
-
Comparator
Deprecated.Constructs a comparator switched on or off, with the specified mode and facing the specified direction.- Parameters:
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 state- See Also:
BlockFace
-
Comparator
Deprecated. -
Comparator
Deprecated.Magic value- Parameters:
type- the typedata- the raw data value
-
-
Method Details
-
setSubtractionMode
public void setSubtractionMode(boolean isSubtraction)Deprecated.Sets whether the comparator is in subtraction mode.- Parameters:
isSubtraction- True if the comparator is in subtraction mode, false for normal comparator operation
-
isSubtractionMode
public boolean isSubtractionMode()Deprecated.Checks whether the comparator is in subtraction mode- Returns:
- True if the comparator is in subtraction mode, false if normal comparator operation
-
setFacingDirection
Deprecated.Sets the direction this comparator is facing- Specified by:
setFacingDirectionin interfaceDirectional- Parameters:
face- The direction to set this comparator to- See Also:
BlockFace
-
getFacing
Deprecated.Gets the direction this comparator is facing- Specified by:
getFacingin interfaceDirectional- Returns:
- The direction this comparator is facing
- See Also:
BlockFace
-
toString
Deprecated.- Overrides:
toStringin classMaterialData
-
clone
Deprecated.- Overrides:
clonein classMaterialData
-
isPowered
public boolean isPowered()Deprecated.Checks if the comparator is powered -
isBeingPowered
public boolean isBeingPowered()Deprecated.Checks if the comparator is being powered- Returns:
- true if the comparator is being powered
-