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.13",
forRemoval=true)
public class Comparator
extends MaterialData
implements Directional, Redstone
Deprecated, for removal: This API element is subject to removal in a future version.
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, for removal: This API element is subject to removal in a future version.protected static final boolean
Deprecated, for removal: This API element is subject to removal in a future version.protected static final boolean
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north).Comparator
(BlockFace facingDirection) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a comparator switched off, with the default mode (normal) and facing the specified direction.Comparator
(BlockFace facingDirection, boolean isSubtraction) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a comparator switched off, with the specified mode and facing the specified direction.Comparator
(BlockFace facingDirection, boolean isSubtraction, boolean state) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a comparator switched on or off, with the specified mode and facing the specified direction.Comparator
(Material type) Deprecated, for removal: This API element is subject to removal in a future version.Comparator
(Material type, byte data) Deprecated.Magic value -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Gets the direction this comparator is facingboolean
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the comparator is being poweredboolean
Deprecated, for removal: This API element is subject to removal in a future version.Checks if the comparator is poweredboolean
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the comparator is in subtraction modevoid
setFacingDirection
(BlockFace face) Deprecated, for removal: This API element is subject to removal in a future version.Sets the direction this comparator is facingvoid
setSubtractionMode
(boolean isSubtraction) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether the comparator is in subtraction mode.toString()
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack
-
Field Details
-
DEFAULT_DIRECTION
Deprecated, for removal: This API element is subject to removal in a future version. -
DEFAULT_SUBTRACTION_MODE
protected static final boolean DEFAULT_SUBTRACTION_MODEDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
DEFAULT_STATE
protected static final boolean DEFAULT_STATEDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
Comparator
public Comparator()Deprecated, for removal: This API element is subject to removal in a future version.Constructs a comparator switched off, with the default mode (normal) and facing the default direction (north). -
Comparator
Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version. -
Comparator
Deprecated.Magic value- Parameters:
type
- the typedata
- the raw data value
-
-
Method Details
-
setSubtractionMode
public void setSubtractionMode(boolean isSubtraction) Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Checks whether the comparator is in subtraction mode- Returns:
- True if the comparator is in subtraction mode, false if normal comparator operation
-
setFacingDirection
Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.Gets the direction this comparator is facing- Specified by:
getFacing
in interfaceDirectional
- Returns:
- The direction this comparator is facing
- See Also:
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
toString
in classMaterialData
-
clone
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
clone
in classMaterialData
-
isPowered
public boolean isPowered()Deprecated, for removal: This API element is subject to removal in a future version.Checks if the comparator is powered -
isBeingPowered
public boolean isBeingPowered()Deprecated, for removal: This API element is subject to removal in a future version.Checks if the comparator is being powered- Returns:
- true if the comparator is being powered
-
BlockData
.