Package org.bukkit.material
Class Comparator
java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Comparator
- All Implemented Interfaces:
Cloneable
,Directional
,Redstone
@Deprecated(since="1.14.1")
public class Comparator
extends MaterialData
implements Directional, Redstone
Deprecated.
Represents a comparator in the on or off state, in normal or subtraction mode and facing in a specific direction.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final BlockFace
Deprecated.protected static final boolean
Deprecated.protected static final boolean
Deprecated. -
Constructor Summary
ConstructorDescriptionDeprecated.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 TypeMethodDescriptionclone()
Deprecated.Deprecated.Gets the direction this comparator is facingboolean
Deprecated.Checks if the comparator is being poweredboolean
Deprecated.Checks if the comparator is poweredboolean
Deprecated.Checks whether the comparator is in subtraction modevoid
setFacingDirection
(BlockFace face) Deprecated.Sets the direction this comparator is facingvoid
setSubtractionMode
(boolean isSubtraction) Deprecated.Sets whether the comparator is in subtraction mode.toString()
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:
-
DEFAULT_STATE
protected static final boolean DEFAULT_STATEDeprecated.- See Also:
-
-
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:
-
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:
-
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:
-
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:
setFacingDirection
in interfaceDirectional
- Parameters:
face
- The direction to set this comparator to- See Also:
-
getFacing
Deprecated.Gets the direction this comparator is facing- Specified by:
getFacing
in interfaceDirectional
- Returns:
- The direction this comparator is facing
- See Also:
-
toString
Deprecated.- Overrides:
toString
in classMaterialData
-
clone
Deprecated.- Overrides:
clone
in 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
-
BlockData
.