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. UseBlockData.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
All Methods Instance Methods Concrete Methods Deprecated Methods 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 Detail
-
DEFAULT_DIRECTION
protected static final BlockFace DEFAULT_DIRECTION
Deprecated.
-
DEFAULT_SUBTRACTION_MODE
protected static final boolean DEFAULT_SUBTRACTION_MODE
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_STATE
protected static final boolean DEFAULT_STATE
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Comparator
public Comparator()
Deprecated.Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).
-
Comparator
public Comparator(BlockFace facingDirection)
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
public Comparator(BlockFace facingDirection, boolean isSubtraction)
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
public Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state)
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
public Comparator(Material type)
Deprecated.
-
Comparator
@Deprecated public Comparator(Material type, byte data)
Deprecated.Magic value- Parameters:
type- the typedata- the raw data value
-
-
Method Detail
-
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
public void setFacingDirection(BlockFace face)
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
public 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
public String toString()
Deprecated.- Overrides:
toStringin classMaterialData
-
clone
public Comparator 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
-
-